Saving data using the "File System" option

I’m packaging my game to be used in Windows, and I’m trying to learn how to use the FileSystem option instead of the storage option. I’d like to be able to save and retrieve data from a folder where the game’s executable is, but I’m not sure I’m doing it right. When I “Create a Directory”, I’ve set the path to be FileSystem::ExecutablePath() + FileSystem::PathDelimiter() + “savedata”. I don’t see any directory created after this action has been performed. Where am I going wrong? Also, does this only work after the game is packaged or can this be tested while using the game engine?

Is the path you’ve creating correct? Either debug and interrogate the full path, or do a hacky debug and set the text field of a temporary onscreen textObject to the path to confirm it’s what you expect it to be.

When you use preview FileSystem::ExecutablePath() is exe of gdevelop.

When you need print this path somewhere for debug like said MrMen.
And do same debug for savedata.

1 Like