Getting VERY frustrated at this stupid load crash!
Posted: Fri Mar 11, 2011 1:38 pm
It works one moment, FREKN CRASHES THE NEXT >:[
There's nothing wrong with the code so WTH??? here's the code for my save and load button. (They're one button that work depending on a variable called "mode")
PLEASE HELP >.>
There's nothing wrong with the code so WTH??? here's the code for my save and load button. (They're one button that work depending on a variable called "mode")
- Code: Select all
char *NAME;
sprintf(NAME, "%s", FA_NAME.text);
switch(mode) {
case 0:
saveVars(NAME, "data");
break;
case 1:
loadVars(NAME, "data");
DOLOAD=1;
XSPD.textNumber=XSPD_SAV;
SPD.textNumber=YSPD_SAV;
gs.xvelocity=XSPD_SAV;
gs.yvelocity=YSPD_SAV;
switch(BG) {
case 0:
ChangeAnimation("gs", "SCREEN", FORWARD);
break;
case 1:
ChangeAnimation("gs", "Grass", FORWARD);
break;
case 2:
ChangeAnimation("gs", "water", FORWARD);
break;
case 3:
ChangeAnimation("gs", "clouds", FORWARD);
break;
case 4:
ChangeAnimation("gs", "rock", FORWARD);
break;
case 5:
ChangeAnimation("gs", "space", FORWARD);
break;
case 6:
ChangeAnimation("gs", "dark", FORWARD);
break;
}
break;
}
PLEASE HELP >.>