• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Pokemon Essentials suddenly not "remembering" global variables?

  • 38
    Posts
    9
    Years
    So I seem to have encountered an odd problem...i've been working on writing my own scripts over the last few days, nothing crazy, havn't even been modifying the "vanilla" scripts, but for whatever reason, whenever I close the game and restart it, my game seems to have forgotten the values of all the global variables in the game...it seems to remember the in-game variables, just not the ones in the scripts that start with a "$"...I have absolutely no idea why...i'm pretty sure i havn't touched any scripts that would affect something so vital like that...

    Also, even weirder, I tried restarting my game to see if that would work, but after saving the new game over the old one, when I start up the game again, the OLD save file is there rather than the new one? It's very bizzare, it's probably something to do with what happens when you "turn off" the game. Maybe I inadvertently altered a script i shouldn't have by accident? Do any of you have any idea what might be causing this?
     
    So I seem to have encountered an odd problem...i've been working on writing my own scripts over the last few days, nothing crazy, havn't even been modifying the "vanilla" scripts, but for whatever reason, whenever I close the game and restart it, my game seems to have forgotten the values of all the global variables in the game...it seems to remember the in-game variables, just not the ones in the scripts that start with a "$"...I have absolutely no idea why...i'm pretty sure i havn't touched any scripts that would affect something so vital like that...

    This is perfectly normal. The global variables are not stored in the savefile. The save file contains only what the function pbSave tells it to store. (See the file PScreen_Save)

    Also, even weirder, I tried restarting my game to see if that would work, but after saving the new game over the old one, when I start up the game again, the OLD save file is there rather than the new one? It's very bizzare, it's probably something to do with what happens when you "turn off" the game. Maybe I inadvertently altered a script i shouldn't have by accident? Do any of you have any idea what might be causing this?

    Beware that when you make a new savefile, the game gives you a warning. And if you mash the space bar without reading it, it tells you something like "are you sure you want to rewrite the old savefile" and it shows you "No" and "Yes", in that order:
    [PokeCommunity.com] Pokemon Essentials suddenly not "remembering" global variables?

    So if you mashed the space bar without reading, you most probably selected "No".

    If it's not this, then you probably broke something.
     
    Ha...it's funny, I've been working with Essentials for like, 2 or 3 years now at this point and I always just assumed that global variables were stored in the savefile! I wonder how i never noticed that, lol. And you're probably right about me just mashing the spacebar and hitting "no." I knew that the "no" option was default, but i suppose i was just frustrated and not thinking clearly at the time cause of the "problem" i was trying to fix, haha. Thanks for clarifying anyway!
     
    Back
    Top