Savestate doesn't load correctly...
Posted: Sat Dec 10, 2005 11:49 am
I create a savestat file for reloading the score and therefore the actual position in the game:
When level1 exists i run following script:
saveVars("save.dat", "Savestate");
LoadGame("level2.dat");
On the beginning of level2, when the counter is created i run the following script:
loadVars("save.dat", "Savestate"); element_Score.textNumber = ScoreCounter;
But the counter is always showing zeroes when loading the next level
* ScoreCounter is my integer var for the score, which will be saved in the group Savestate.
By the way:
Is there an "if exist" routine available in GE?
I remember "if exists filename" on amiga... But how does it work in GE?
The score and therefore the last finished level should be loaded only if file"save.dat" exists.
Any help?
When level1 exists i run following script:
saveVars("save.dat", "Savestate");
LoadGame("level2.dat");
On the beginning of level2, when the counter is created i run the following script:
loadVars("save.dat", "Savestate"); element_Score.textNumber = ScoreCounter;
But the counter is always showing zeroes when loading the next level
* ScoreCounter is my integer var for the score, which will be saved in the group Savestate.
By the way:
Is there an "if exist" routine available in GE?
I remember "if exists filename" on amiga... But how does it work in GE?
The score and therefore the last finished level should be loaded only if file"save.dat" exists.
Any help?