DaveTheCoder
Ok did that but it didnt work, Im probably doing something wrong to be honest, anyhow heres what I have currently. See anything wrong with it that could be throwing it off?
`

data

func saveFileFunc(File,_Difficulty) :
var parentFilePath = "user://Documents"

if not FileAccess.file_exists(parentFilePath+"/"+gameName+".txt") :
	print('creating')
	
	var GameFile := FileAccess.open(parentFilePath + "/" + gameName + ".txt", FileAccess.WRITE)

	if GameFile != null:
		print("Created game file successfully!")  # Clear message for success

		GameFile.store_string("Game file thing")
		GameFile.close()
	else:
		print("Failed to create game file:")  # Clear message for failure
		print(FileAccess.get_open_error())  # Get detailed error message

`

Do I need to set something in Project Settings? I feel like it could be something simple like that

DaveTheCoder
Oh sorry! I shouldve thought to answer these!
gameName is a string, which is as of now "UntitledGame"
The output is:

creating
Failed to create game file:
7

The result of .get_open_error() is 7,
If you need anything else please feel free to ask!

DaveTheCoder You were right, documents doesnt exist! After removing the documents part it works!
Ill ask if I have more questions!

DaveTheCoder
Ok quick question, once this file is created, if the path is: "user://"+ "gameName" + ".txt", where does it appear on my PC cause I cant find it

DaveTheCoder Ok so yeah that makes sense, anyhow Im struggling to figure out how to make it go to a path outside of that file and lets say put it in to documents (documents being the folder that comes built in to a PC most of the time).
Thank you btw

DaveTheCoder Could you show me an example? Im kinda bad at figuring these things out on my own as youll have noticed

Using absolute paths here is not a very good idea. Just use user:\\ provided by Godot. If you want to know what's its absolute path - ask the engine:

print(ProjectSettings.globalize_path("user://"))

    DaveTheCoder You didn't read the preceding posts.

    Just skimmed over them, but using absolute paths from a game (engine) is something you never want or need to do.

    DaveTheCoder Are you intentionally acting obtuse?

    No, why would I want to do that? I'm just quite busy lately so forgive me if my attention is a bit floaty.

    That said, I still can't catch why absolute paths even entered the conversation.

    xyz
    I have a question, if I was to save data with "user://" it says that it is saved to the godot folder on the users computer, but what if someone gets my game and just like dont have godot, where does this path lead?

    • xyz replied to this.

      Frodev It doesn't matter where it leads. That's the whole point of having virtual roots like res:// or user://. The OS will provide some valid writable path somewhere in the appropriate place for user data. It is not the path of Godot executable as OS doesn't even know where that is. Godot doesn't install or register itself to the OS.

      Just use user:// and don't worry about where it is. It will likely be in different places on different machines. If you need to manually check the files while developing, print the user path form within Godot using globalize_path() and look there, as I mentioned earlier.