Hi… When i try to test on something that an xml file can work to write and read, it comes out as 0.
how can i solve this???
Hi… When i try to test on something that an xml file can work to write and read, it comes out as 0.
how can i solve this???
Make sure the directory exists (i.e. the folder “Save”, alongside the .gdg file). After exporting the game, the folder “Save” should be created in the compilation directory.
You can avoid creating directories just by deleting the “Save/” path (only write the file name), so the file will be written next to the .gdg file / game executable
EDIT: Good news, you can create a directory from the game, there is an action to launch a terminal/cmd command in “Files >> Execute a command”, just launch the command “mkdir Save”, it will create the directory “Save” next to the project file or compiled game, fortunately the command works in both Windows and Linux (“mkdir” in lower case, “MKDIR” only works on Windows)
This will ensure the game will be able to save a game even if the user has deleted this directory (of course resetting the save file).