How does loading & saving fix an error?

I have the strangest bug in my game. I'm currently trying to track it, but it would help if someone might know the cause.

In one area I give and remove a few skills of the player. The next battle they are not there, and if I print $game_party.actors[0].skills, I don't see them:

[80, 82, 87, 88]

But when I save my game and load that exact save, they're there!

[80, 81, 87, 88, 187]

Even the skill that I removed is finally gone.

What could be going on that I NEED to load & save? I don't understand. How does that change / fix the same array?

Thank you in advance. 🙂 *goes back to playtesting the bug*

(Note: this bug ONLY occurs if I playtest from the very beginning, so I'm currently trying to pinpoint how much I can skip with it still occurring... and it occurs 25 minutes into the game, so yay... Everywhere else in the game this works fine.)
I think we would need some screen shots of the events involved to be able to help.
Really? There's not much going on. Just your usual common event with some learn_skill() calls. And this only occurs if I playtest the entire game from the beginning, so the cause could be anywhere, but not in the actual event.

I'm just curious if anyone knows how saving & loading could change (or rather 'fix') the exact same array? How does it change when saving & loading? It's really puzzling and would help me track down the bug.

OR if you can give me any advice for an event / script call to place after the bug occurs to track down what's going on. ^_^
Loading and saving does not change things.


Are you SURE your characters get the skills? At the point where you change them around, do you go into the menu and check the skills for your characters and do you see them there? Or is it only at the next battle that you check?


Are the skills set up to be used in battle?


Do your actors (or their classes) have the correct skill types listed in their features? This is probably what I'd look at first.


You can give a character a skill, but it will only show up if the actor or class has that skill type listed in their features.
If $game_party.actors[0].skills is any indication, no, they don't get the skills after the fight. They don't get them until I save & load. Which is reaaally weird, isn't it? It's almost like I have two $game_party's or two @skills at one point and when I save and load the old one gets erased, but that doesn't make any sense.

Yeah, the skills themselves are fine. Not sure about the "correct skill types", considering I'm using RMXP and that might be an RMVX feature?

I'm about to go playtest from the start again, any advice you could give me? Like some stuff to try~. I know that if you change game switches, events don't change until you hit $game_map.need_refresh. Maybe there's something similar for $game_party? Probably not or I would've seen it by now, but eh.
ah, sorry - I keep assuming people are using Ace unless I see it in big, bold letters.


Do you have any scripts that might affect this? They really should be added as soon as you run the command to add them.


Can you show us screenshots of your event that adds them (include the entire window, so we can see all the conditions and how many tabs there are), along with a screenshot of the actor's skill window immediately after that event is run?


I guess the other question is ... are you CERTAIN the event is being run?
Did you try this? 🙂
Omg are you serious! I never read that post!! *facepalm* Thank you so much for notifying me! I didn't check back there after I "fixed" it.

Let me go try it now. And I'll take your advice as well, Shaz. *playtests*

Edit: Omg, sir, you are AMAZING. Thank you so much! This fixes so many other issues as well. o_o!! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/how-does-loading-saving-fix-an-error.36353/