• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows GM Studio 2 stopped saving progress suddenly

I am 20 hrs into a game creation (following the space rocks DND tutorial and spicing it up my way). When I run the game after I created the 9th object (and its sprite), I kept getting an error as soon as the object instance creation is triggered (there’s nothing funny or special about the instance creation event/action). After several Google attempts that got me nowhere, I discovered that when I reloaded the project, GM discarded the new object and sprite but kept any other changes. Weird.

The error relates to the object (ie. obj_game) that triggers the new object’s instance creation (obj_Alien). An extract of the error reads as follows: “Variable obj_game.obj_Alien(***,***) not set before reading it.” (I replaced numbers with ***.)

What I figured out, is that even though the new object and its sprite exists in GM, when I press F5 to run the game, the new object and sprite do not exist. I realized this when I quit GM, restarted my laptop, launched GM and reloaded my project. Suddenly, the new object and its sprite were missing. And here’s a few weirder problems:

1.) Changes I made after I created the new object & sprite, were still saved;

2.) I redid the object and sprite, saved the project without running the game first, but still, as soon as I reloaded the project, the new object and sprite were again missing, even though any other changes were saved. (Eventually I discovered I am not able to create any new sprites either. As soon as I save/close/relaunch/reload the project, the sprite is removed.)

3.) The first time I recreated the object and sprite from scratch, this happened: I first recreated the sprite. (I later realized that the sprite was not lost as it was saved on my hard drive and could simply be imported.) I then recreated the object, and linked it to the sprite (or vice versa, whatever). Obviously, the new object still had no events yet. So I started by creating a “Create” event. As soon as I did that, the “Create” event filled itself automatically with the content I designed before. Weird, right? Anyway, subsequent attempts to recreate the object from scratch did not magically fill the event contents again.

So, what the hell is going on?!

I have the free version of GM Studio 2 (updated to the latest version yesterday).

A Reddit user suggested I open the project’s YYP file in NotePad and find the resources lines relating to the sprite and object, and then to delete those two lines. The YYP file doesn’t have any lines related to the new sprite or new object.

What else should I try?
 

TsukaYuriko

☄️
Forum Staff
Moderator
Where are your project files stored? Local hard drive that is entirely disconnected from the internet? Cloud sync drive?
 
Local drive (in a my documents sub folder).
I checked, no write protection applied to the folder or it’s contents or sub folders/contents).
 

Roldy

Member
Are you on Mac or Windows? EDIT: Ok I now see the post tagged as Windows.

Try File->Save As and save to a new location and new project name.
Try File->Export Project and then import it again with different name/location
Try reverting to an older copy of your project
 
Solved: I installed GM Studio 2 on my son’s PC, loaded my project, created a new object, saved and quit. I could then continue my project on my laptop as usual.
 
I just found myself in a very similar situation. Posting mainly for posterity, since it took a good bit of googling before finding anything about this bizarre problem.

Updated GM2 today to the latest version v2022.5.0.8 (just as OP mentions recently updating their version).
I opened an existing project and started making edits. When I ran the game, none of my edits were being applied.

I set up breakpoints and examined the code in the debugger. All the code I deleted/refactored was present in its original form!
Next, I intentionally wrote errors into my code (misspelling variables, improper syntax, etc.) and the game ran just fine.

There were asterisks next to my events (to signify that the file has been altered since its last saved state) and they never went away, no matter how often I hit the save button or ran the game.
Restarting the IDE and/or reopening the project just proved that none of those save attempts did anything. The project simply would not update.

After trying all the suggestions in this thread, nothing worked. I ended up making a new blank project and recreating the assets and copying over the code manually.
My project was small, so this didn't take too long but it is hardly an ideal solution. Hopefully, more light can be shed on this issue in the future!
 
I am having the same issue after the update. My project is not small, so I hope a better solution is found soon.
Edit: I did try and create a new project, and that does save normally. I can see how jabroni's solution would work, but that would be a nightmare.

Edit2: I managed to get it working by exporting my project, closing the project, and then importing it. A weird step to have to take, but all is well.
 
Last edited:
To everyone having this problem, I believe that resetting your layout will fix it. It seems as though GMS changed their naming structure for the update and the newly named files aren't getting targeted properly for file changes. Resetting the layout forces the files to be closed and reopened which then allows it to target the correct files. To reset your layout simply go Layouts > Reset Layout in the top menus bar.
 

Fidchell

Member
Having this same issue as well. When I want to modify the game code, I have to use the Steam version, but when I want to test my game, I now have to open it in the standalone.

To everyone having this problem, I believe that resetting your layout will fix it. It seems as though GMS changed their naming structure for the update and the newly named files aren't getting targeted properly for file changes. Resetting the layout forces the files to be closed and reopened which then allows it to target the correct files. To reset your layout simply go Layouts > Reset Layout in the top menus bar.
Didn't work for me, unfortunately.
 
Having this same issue as well. When I want to modify the game code, I have to use the Steam version, but when I want to test my game, I now have to open it in the standalone.



Didn't work for me, unfortunately.
Ah, that sucks, I was hoping it'd be a general fix.
 

Fidchell

Member
I found a temporary fix. I simply have to close the event window (Create, Step, etc) and then reopen it. Hope this works for others, because all the exporting and such sounds like a huge pain.
 
I found a temporary fix. I simply have to close the event window (Create, Step, etc) and then reopen it. Hope this works for others, because all the exporting and such sounds like a huge pain.
That's actually the purpose of the layout reset. I was under the impression that it force-closed all the open event windows. Maybe it doesn't... In any case, perhaps right clicking on one of them and choosing "Close All But This" and then closing the events in that last window might be a quicker fix that closing all the event windows manually.
 
Made an account to say that I think I had a similar issue (Windows, currently using 2022.5.0.8). When making edits, nothing would change what happened when the program ran. Whether I changed text, images, whatever, it kept playing the same exact way, even if I changed something that should have broken it. On closer examination, despite it briefly showing the saving bar in the upper right hand corner, the * next to the windows I was editing didn't disappear (indicating that it hadn't actually been saved) and after closing and reopening the windows it didn't seem to save any new changes I made, no matter how many times I hit the save button. I tried reinstalling, resetting the layout, restarting the computer, saving it as a new project, and none of those things changed anything.

Weirdly though, I right clicked and renamed the object I was editing and suddenly it started saving that specific object (and only that object) properly again. I don't know why it worked, I don't know how it happened, but after slightly renaming all of the things in the project and then renaming them back to what they were originally everything is working normally again. Wanted to leave this here just as another thing for people to try if they have this issue, but since I have no idea why what I did worked I'm not completely sure how useful it is.
 

Qlak

Member
My project also stopped saving few minutes ago :confused:. No idea what happened.

I was working normally and after I made some changes I noticed that nothing happens. Even if I wrote a bad code.
Then I also noticed, that the event in the object, which I was changing has *Create or *Step on the event tab.

I tried saving manually but it does not work. When running the game it does not help as well and it goes on the old event code.
I also tried all the fixes in this topic but nothing helps 😣. If I close the object and open it again, my changes are gone.

Did anyone manage to find out what's wrong?
 

TheMagician

Member
Some thing happened to me yesterday. The computer where it happens runs on Windows 7, though and I have to double check the GM version. However, I've not seen this behavior before on that machine.
 
Top