working directory confusion

bsabiston

Member
Hello,

I've always accessed files in my game by prepending working_directory to the file I want to access, and it has always worked how I expect. But for the past couple of days, GMS is acting weird. For my Windows build, it has always placed the save game files in User/username/AppData/Local/gamename. I use this directory to manually edit game files for testing sometimes.

But for the past few days it is behaving very erratically. If I print out the value of working_directory, it says it is Users\username\AppData\Local\Temp\gm_ttt_36223\gm_ttt_63471. Yet it still seems to be using files from the first directory I listed. I can copy files into there and it will read them. But then the next time I run, or a few times later, it seems to be getting the files from someplace else, like maybe this second directory it lists.

Anyone know what is going on? I know about how it will pull files from the game's included files directory if it can't find them in the sandbox. But this is something different. It seems to be pulling my saved files from two different places and it is causing havoc.

Thanks for any suggestions


EDIT: Ahh, nevermind, I think I found out what was going on, I had a bug in my save code...
Bob
 
Last edited:
Top