Page 1 of 1

Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 1:38 pm
by Hblade
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")
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 >.>

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 2:06 pm
by Camper1995
it looks like the code if OK. I dont know, sometimes is happening to me that GE shows some error. Then I close my GE, open it again and load the game
and then it works (o).(o)

:roll:

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 2:49 pm
by Hblade
Thing is, the code gets accepted, no errors in the code just when I launch the game, and I click the button that saves or loads, it crashes

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 3:00 pm
by Camper1995
oh, yeah I know what you mean. Hm.... in this case I delete the actor and make the script again. (In your case just copy it) :D

It's GE bug

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 3:03 pm
by Hblade
Yeah its defenently a GE bug :'( Because sometimes it works and sometimes it crashes T.T Oh well xD

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 3:51 pm
by Game A Gogo
Try having NAME declared in the global script or the GE Variable dialog... I've had this problem too when using sprintf and a variable created in the same script

Besides.. you could use "strcpy(NAME,FA_NAME.text);"

Re: Getting VERY frustrated at this stupid load crash!

PostPosted: Fri Mar 11, 2011 4:05 pm
by Hblade
Thank you dude :) I'll try that :D