RangerX
Member
Hello all,
I am brain dead right now. I don't know what's going on. I can't seem to save my score right or again my ds lists. That feels basic but I don't see what's wrong. Let's go step by step.
At the beginning of my game, I create a file for saving the "score" variable:
After that, when I enter the "challenge mode", there's a object that immediately reads that file:
Now the interesting result:
- If I go have a game (any save slot) and pass a checkpoint, the score is saved and when I enter "challenge mode" after that, its the right score.
- If I enter the challenge mode after a fresh boot, the score is not the right one. Like it doesn't read the file or something
Color me flabergasted.
I am brain dead right now. I don't know what's going on. I can't seem to save my score right or again my ds lists. That feels basic but I don't see what's wrong. Let's go step by step.
At the beginning of my game, I create a file for saving the "score" variable:
Code:
if(!directory_exists("TLR_gamedata"+string(global.Version)+"\slot01\Data01"))
then
{
directory_create("TLR_gamedata"+string(global.Version)+"\slot01\Data01");
File=file_text_open_write("TLR_gamedata"+string(global.Version)+"\slot01\Data01\0001");
file_text_write_real(File,"000");
file_text_close(File);
}
After that, when I enter the "challenge mode", there's a object that immediately reads that file:
Code:
if(file_exists("\TLR_gamedata"+string(global.Version)+"\slot"+string(global.SlotUsed)+"\Data01\0001"))
then
{
File=file_text_open_read("\TLR_gamedata"+string(global.Version)+"\slot"+string(global.SlotUsed)+"\Data01\0001");
score=file_text_read_real(File);
file_text_close(File);
}
Now the interesting result:
- If I go have a game (any save slot) and pass a checkpoint, the score is saved and when I enter "challenge mode" after that, its the right score.
- If I enter the challenge mode after a fresh boot, the score is not the right one. Like it doesn't read the file or something
Color me flabergasted.