• 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 Help I lost my object with all of my code!!!

D

DavidG2372

Guest
I opened up my project today and my "game_manager" object was missing. It basically runs my game and it has hours upon hours worth of code work in it. In my project's object folder is a folder called "game_manager" which has a bunch of .gml.dnd and .gml files for every event. It also has a file game_manager.yy which is the only file in the folder that shows up in the Add Existing file explorer. When I try to add it, I get a pop-up "Add Existing Failed" that says "Cannot import incompatible resource" and the file path. I also found my GMS2TEMP folder which has a bunch of folders in it named after the project and a bunch of numbers and letters. All of those folders were modified yesterday.

Any help I can get in recovering my object would be greatly appreciated. It had the vast majority of my code from this project I've been working on for well over a month every single day so restarting it would be insane. Thank you.
 

Lukan

Gay Wizard Freak

Right click the objects folder in GM, and use the add existing.
Then navigate to the folder in the project that has the name of your object.
I believe the .yy file in that folder should be what you're looking for!
 
D

DavidG2372

Guest

Right click the objects folder in GM, and use the add existing.
Then navigate to the folder in the project that has the name of your object.
I believe the .yy file in that folder should be what you're looking for!

Trying to add the .yy file gives me an error message as detailed in my original post.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Check your most recent backup's object folder and try adding the resource from there using the Add Existing option. (If you didn't make any backups, take this as a perfect example of why you should be doing it, and start doing it.)

A last resort could be opening the object file in a text editor and checking for any irregularities that could be due to file and/or hard drive corruption, and attempting to fix them by hand. Make a backup first, of course.
 
D

DavidG2372

Guest
It’s been at least a week or two since my last backup and the vast majority of the work in all that time has been in this object. So much of this work was so tedious that I can hardly imagine doing it again. My error message means the file is corrupted? It sounds like it could get very technical to fix it.

Can I do anything with those gml files? I’m not at the computer now. Maybe there’s an add existing for events.
 

TsukaYuriko

☄️
Forum Staff
Moderator
You can try opening the object file in a text editor and checking for any irregularities that could be due to file and/or hard drive corruption, and attempting to fix them by hand.

Event contents are stored separately from objects in your local file system's project files, inside the corresponding object's folder. You may copy and paste them freely.
 
D

DavidG2372

Guest
I opened up my object in a text editor. It's just a bunch of spaces. Some of my events have information in them and some are blank like key_press_13 which is the largest one (246k).
 
Last edited by a moderator:

TsukaYuriko

☄️
Forum Staff
Moderator
In that case, some of your files seem corrupted and can not be repaired by hand. Operating system-level functionality like local file backups, which may or may not exist, aside, there is nothing you can do to get your files back. You can prevent such incidents in the future by making (preferably incremental) backups more frequently.
 
Top