Page 1 of 1

Saving variables.

PostPosted: Sun May 10, 2009 5:40 am
by Hblade
I am using variables in one .exe file and I'd like to load the same variables in a different exe file. The variables are very usefull, and are needed in both programs. I also need them to be the same values as they were when the new program was loaded.

HP: 89

When I load the different .exe file, I wan't the HP to still be 89.

Re: Saving variables.

PostPosted: Sun May 10, 2009 6:06 am
by skydereign
You would just maintain the same save/load. If your variable is HP, the variable group would be hp. When saving the variable,
Code: Select all
saveVars("HP.sav", "hp");

When loading,
Code: Select all
loadVars("HP.sav", "hp");


What you need to make sure is that you are saving and loading the same group name and file. Both games need the same variable, aside from that there is nothing else to it.

Re: Saving variables.

PostPosted: Sun May 10, 2009 6:08 am
by Hblade
Yay.