FIXED - Help With Saving And Loading Via Events (Please, I'm Desperate)

Hi everyone! It's been a while, but I'm back with more questions (because I am very dumb 😅 ). I'm having a very big (very game-breaking) issue that I need help with. Essentially, I'm trying to make a single file save system (because I don't want people going back to fix mistakes they've made). I completely cut out the default title screen and made my own using events. On it, there is an option to start a new game (if you have a save file it becomes "Continue") and an option to exit the game. Everything works perfectly until you try to save for a second time. The first time you save, you can use the "Continue" option to get back to where you were, but the next time you save and try to use "Continue" to get back, it says

TypeError
Cannot read property 'name' of undefined
​
After you get this error you have to completely delete the save file, or else it just keeps doing it. I've already spent close to three hours trying to figure this out on my own, but I just can't. I could really use some help here because I don't know how I'm going to publish this if you can't even save. Can anyone help me with this? I'm going to include my code below just in case it might help.

The code I'm using to load the save file
if (DataManager.loadGame(1)) {
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
$gamePlayer.requestMapReload();
SceneManager.goto(Scene_Map);
}


The code I'm using to save the game
$gameSystem.onBeforeSave();
if (DataManager.saveGame(1)) {
StorageManager.cleanBackup(1);
}
please show us screenshots of the events.
there are several ways how you can have messed up the scriptfunctions by placing them wrongly, and we need the full event (including properties) to check for that.
please show us screenshots of the events.
there are several ways how you can have messed up the scriptfunctions by placing them wrongly, and we need the full event (including properties) to check for that.
Oh, I'm sorry. Here's the event that loads save files,
Screen Shot 2020-05-11 at 6.30.19 PM.png

Screen Shot 2020-05-11 at 6.30.28 PM.png

Screen Shot 2020-05-11 at 6.30.35 PM.png

Screen Shot 2020-05-11 at 6.30.40 PM.png

And here's the event that saves the game,
Screen Shot 2020-05-11 at 6.22.55 PM.png
Whoops, I found the issue. I don't need help anymore.
Whoops, I found the issue. I don't need help anymore.
I'm curious as to how you were able to solve this...
Here's the event that loads save files,
No, it isn't. There is a reason why I wrote
we need the full event (including properties)
and you cut off all properties of the event, giving only the content/commands.

For the next time you need help, please remember that the contents are only half of the event and that a lot of the possible event problems come from improper use of triggers, conditions and so on.
No, it isn't. There is a reason why I wrote

and you cut off all properties of the event, giving only the content/commands.

For the next time you need help, please remember that the contents are only half of the event and that a lot of the possible event problems come from improper use of triggers, conditions and so on.
Oh, sorry. I've never heard of them referred to as properties so I didn't know what you were talking about.

I'm curious as to how you were able to solve this...
I was using a plugin that generates a compass in the top left corner of the screen and the game was having trouble saving because of it. It didn't know how to load the save file because it didn't know whether the compass was supposed to be there or not. I just scrapped the compass entirely, the game is fine without it. That's what the "Show Compass" plugin command was doing.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/fixed-help-with-saving-and-loading-via-events-please-im-desperate.121432/