• 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.

Question - IDE [Solved] Room Vanishing from IDE List

So... I have no real idea how to explain this, but basically one of the rooms in my game has vanished from the list. It is named "rm_forest_kendlith". Here is a picture of the rooms folders:

Rooms Bug.PNG

As you can see, it is not there. But here is where it gets weird.
  • I can still go to and visit the room with no issues, using room_goto. It works exactly as expected. Just, I can't edit it in the room editor because it's not in the list.
  • The .yy files inside the project folder for this room look exactly identical to the other room files.
  • Github is also reading the file fine.
  • Clearing the cache, or restarting gamemaker does not change anything. Nor does overriding the room file in the project folder by copying an older version from a backup.
This actually happened before, here is what happened last time (two or three days ago). (I'm posting now because it happened a second time and if it is a bug I should report it. But I don't know how to reproduce it so...)
  • Behavior was the same the first time.
  • Github logged no changes at all since several commits earlier. Maybe the room disappeared sooner than that, but I can't identify any changes that would somehow cause this.
  • I was able to fix this the first time by manually opening the .yy with text editor and making a change (in this case renaming one of the layers). After that it showed back up.
  • I have not created a new Github commit since the first time it happened.
My only theory is that this somehow has to do with Github, or it's a freaky weird bug in GMS2. For Github I just have a repository set up for the project folder. I'm fairly new at Github, but it seems if that was messing with files, it wouldn't be just this very specific file.

Considering I need that room, I'm going to copy the entire project folder exactly as it is (as an archive in case someone else wants to look at it) and manually edit the .yy to see if it shows up again. I will try duplicating the room and leaving the old one to see if either of them disappear again. But I don't know what caused it to disappear in the first place so I have no real idea about that.

EDIT UPDATES:
Upon further inspection, renaming the layer did not work this time like it did last time. I cannot find any way to load the room properly again. It's not exactly a big loss in this case but if it happens again I may have a really big problem. I am going to try loading my backups to recover the room, otherwise I'm going to recreate the room from scratch.

NEXT UPDATE:
Hm, I have succeeded (?) at getting another test room to disappear. When I edits the .yy file for the room while GMS2 was running, the save/reload message popped up like, "changes have been noticed". I clicked reload, assuming it would read the changes to the files I made as apposed to overwriting them with the settings in the IDE. It didn't change at all. Then I saved and closed gamemaker. When I opened it again the room was not in the list.

But that leads to the question of how I would've modified a file while GMS2 was running (and why when the file looks and operates exactly correctly the IDE still doesn't recognize it). I wasn't messing around with internal files until this problem started happening. I assume it has to do with Github so maybe it has nothing to do with Gamemaker. But I'd like a pinpoint on the problem so I can avoid it happening again. I can't just... stop using source control.

EDIT: Add existing doesn't work. It says .yy is an incompatible file type. I assume that's not what you're supposed to load with that functionality, but then what am I supposed to load using that?
 
Last edited:
Alright thanks for the help. I couldn't find that post when I searched.

Can confirm that the issue @BaBiA Game Studio mentioned is the one I was facing. Here is the bug report for the issue, marked as resolved: https://bugs.yoyogames.com/view.php?id=29300

The issue is json reading/writing with strings with /n (newline) in them, specifically with instance string variables. It makes sense because this room has such newlined strings and is the only one. The solution, apparently, is to use \\n instead of \n when writing the strings. This seems to fix the issue. They said they'll add an error report in the IDE at some point, so other people don't have to go on this whole chase.

EDIT: Though upon further investigation that is hardly a solution either. The problem is, every time you edit the instance in the room again, it deletes one of the forward slashes until they're all gone and the json freaks out. (Highly technical explanation that). The only real solution is using instance creation code just like back in GMS1 if you're making a string that needs newlines.
 
Last edited:
M

MarceloP

Guest
Hello @Cloaked Games,

Try copying and pasting this JSON to a JsonFormat tool and let us know what was wrong in it. There must be another error so that it is not being able to open the JSON.
I, personally, would add the /n later, instead of adding it as a variable (this was the real problem, /n on Variables of an Object/Instance of the type text).
 
Top