XP Error when trying to load a save file after adding a saving plugin

I'm trying to use this plugin to modify saving in my game, but it creates an error when I try to load my save files.
Script 'Improved Save' line 1019: NoMethodError occured.

undefined method `/' for #<Game_Map:0xd08e668>

The settings for it I changed were disabling quicksave, turning autosave into type 1 instead of 0, disabling faces and turning on characters instead, disabling date and turning on money instead, making the max slots 99 and looking for files named Save to use my save files from earlier.
Ruby:
frame_count = Marshal.load(file)
time_stamp = file.mtime
total_sec = frame_count / Graphics.frame_rate

Marshal saves data in a linear order and that won't ever change. The problem is that the 11th value it loads is the old $game_map instead of the total number of frames. At the same time, the $game_map was supposed to be loaded right after HP, SP, the description, and the complete game flag.

What that means is that it's a script design issue. The game saving and loading mechanisms should be rewritten to take into account what the script is really expecting to ever find in the save file.

Add a new line right before defining the frame_count. Make it look like this:

print map

What does the popup window say while trying to load a save file?
Ruby:
frame_count = Marshal.load(file)
time_stamp = file.mtime
total_sec = frame_count / Graphics.frame_rate

Marshal saves data in a linear order and that won't ever change. The problem is that the 11th value it loads is the old $game_map instead of the total number of frames. At the same time, the $game_map was supposed to be loaded right after HP, SP, the description, and the complete game flag.

What that means is that it's a script design issue. The game saving and loading mechanisms should be rewritten to take into account what the script is really expecting to ever find in the save file.

Add a new line right before defining the frame_count. Make it look like this:

print map

What does the popup window say while trying to load a save file?
It says #<Game_Variables:0xd090088> before showing the error message which is now for line 1020.
That means it's loading the $game_variables instead of $game_map... So you'd need to print every variable in that method to learn what you are actually loading and in which order you're loading them. Then you'd have to confirm whether or not it has ever saved the frame_count.
How do I know which ones it talks about?
That means it's loading the $game_variables instead of $game_map... So you'd need to print every variable in that method to learn what you are actually loading and in which order you're loading them. Then you'd have to confirm whether or not it has ever saved the frame_count.
I don't want to sound rude or impatient, but when are you going to answer my question? I can't do anything else with my game when I can't test it.
other question:

was the save made before you added that script, or does it come from a new game after adding the script?

Adding a more complex script often makes older saves incompatible, requiring you to start a new game.
You can test this by starting a playtest, select new game, save and then load that specific save.

if it works, you'll need to start a new playtest game.
it it doesn't work, then there is a problem with the script
other question:

was the save made before you added that script, or does it come from a new game after adding the script?

Adding a more complex script often makes older saves incompatible, requiring you to start a new game.
You can test this by starting a playtest, select new game, save and then load that specific save.

if it works, you'll need to start a new playtest game.
it it doesn't work, then there is a problem with the script
The save is from before I added it. It works with a new one.
So problem solved - you need to start a new game.

and no, there isn't really anything you can do about that. Even professional games and developers have problems with savefile versioning as you can see whenever they say "the features of this update are only active when starting a new game".

Original thread: https://forums.rpgmakerweb.com/threads/error-when-trying-to-load-a-save-file-after-adding-a-saving-plugin.177885/