F
#Frogglets ;-;
Guest
hello,
What i'm trying to do (which is pretty self explanatory) is have a number save to a variable. It'll save all up until you reopen the game, which isn't very good. I've looked at all instances of the variable and none of which set the variable from one to zero again. My ini code is:
game start:
ini_open("saveData.ini")
global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
ini_close();
game end:
ini_open("saveData.ini")
ini_write_real("Variables","stonebuy",global.stonebuy);
ini_close();
all instances:
oSaveExit-Step at line 24: ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Create at line 5: global.stonebuy = 0;
oMoney-Game Start at line 18: global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Game Start at line 18: global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Game End at line 18: ini_write_real("Variables","stonebuy",global.stonebuy);
oMines-Create at line 5: if global.stonebuy = 1
oMines-Create at line 9: if global.stonebuy = 0
oStoneBuy-Step at line 4: global.stonebuy = 1;
oDbug-Draw at line 1: draw_text(10,10,string(global.stonebuy));
It definitely isn't the create code as I even set that to 5 for a try but it'll still reset to 0.
any help is greatly appreciated,
thanks in advance
What i'm trying to do (which is pretty self explanatory) is have a number save to a variable. It'll save all up until you reopen the game, which isn't very good. I've looked at all instances of the variable and none of which set the variable from one to zero again. My ini code is:
game start:
ini_open("saveData.ini")
global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
ini_close();
game end:
ini_open("saveData.ini")
ini_write_real("Variables","stonebuy",global.stonebuy);
ini_close();
all instances:
oSaveExit-Step at line 24: ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Create at line 5: global.stonebuy = 0;
oMoney-Game Start at line 18: global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Game Start at line 18: global.stonebuy = ini_write_real("Variables","stonebuy",global.stonebuy);
oMoney-Game End at line 18: ini_write_real("Variables","stonebuy",global.stonebuy);
oMines-Create at line 5: if global.stonebuy = 1
oMines-Create at line 9: if global.stonebuy = 0
oStoneBuy-Step at line 4: global.stonebuy = 1;
oDbug-Draw at line 1: draw_text(10,10,string(global.stonebuy));
It definitely isn't the create code as I even set that to 5 for a try but it'll still reset to 0.
any help is greatly appreciated,
thanks in advance