Getting VERY frustrated at this stupid load crash!

Non-platform specific questions.

Getting VERY frustrated at this stupid load crash!

Postby Hblade » 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")
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 >.>
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Camper1995 » Fri Mar 11, 2011 2:06 pm

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:
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Hblade » Fri Mar 11, 2011 2:49 pm

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Camper1995 » Fri Mar 11, 2011 3:00 pm

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
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Hblade » Fri Mar 11, 2011 3:03 pm

Yeah its defenently a GE bug :'( Because sometimes it works and sometimes it crashes T.T Oh well xD
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Game A Gogo » Fri Mar 11, 2011 3:51 pm

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);"
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Getting VERY frustrated at this stupid load crash!

Postby Hblade » Fri Mar 11, 2011 4:05 pm

Thank you dude :) I'll try that :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest