I am implementing a JSON save system using ds_maps and ds_lists and saving the game data by writing it to a buffer and from there saving it to a file.
Saving and loading is working fine and I was about to add the option to delete the file in case the player wants to restart the game, using
When I realised that I don't know what would happen if there were a file saved on my computer with the same file name as my save file. I've looked at the manual and it says that file_delete() "will only delete those files that GameMaker Studio 2 is able to create and parse: ini files, text files and binary files, or those files made to store game created resources like sprites or surfaces. However, it will not delete any other file."
So I have 2 questions:
Do I need to give the save file a very obscure name so that there is no chance that my game will delete the wrong file?
Is it even possible to delete a file saved in this way?
Thanks
Saving and loading is working fine and I was about to add the option to delete the file in case the player wants to restart the game, using
GML:
if (file_exists(filename))
file_delete(filename);
So I have 2 questions:
Do I need to give the save file a very obscure name so that there is no chance that my game will delete the wrong file?
Is it even possible to delete a file saved in this way?
Thanks