problem with saving high score name on GE

Non-platform specific questions.

Postby frodo » Thu Mar 30, 2006 5:11 pm

plinydogg,
in create actor I do:

strcpy(name.text,save);

Then in Game mode, My actor isn't there!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
It's like there isn't anything is the variable "save"!!!!!!!!!!!!!!!!!!!!!

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!! ANYBODY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby plinydogg » Fri Mar 31, 2006 1:04 pm

Well actually, you're probably more right than you know....there isn't anything there!

First, make sure that you load the high score name variable at some point (I usually do it when the game first starts). In the following example replace "game.sav" with whatever you've named the file and replace "save group" with whatever group you've saved you high score name variable in:

loadVars("game.sav", "save group");

The first time you load the high score name variable and try to display it, it's not going to display anything. Why? Because you haven't saved any name in the variable yet (in other words, the actor looks like it has disappeared because it's as if the actor is displaying an empty string: "").

Saving a name in the variable is a two-step process:

(1) copy a name into the variable. And don't forget to use strcpy() instead of trying to assign the name like you would assign a number to a variable!

(2) use the saveVars() function exactly like you used the loadVars() function above.

When all of this is done, it should work (assuming everything else is in order). Hope I've been detailed enough.
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby frodo » Fri Mar 31, 2006 5:04 pm

it still dosn't work.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby plinydogg » Wed Apr 05, 2006 3:17 pm

I've been trying to think of other solutions but I haven't been able to so far............ :(
plinydogg
 
Posts: 104
Joined: Thu Aug 25, 2005 8:34 pm
Score: 0 Give a positive score

Postby frodo » Mon May 01, 2006 4:05 pm

???????????????????????????????????????????????????????????????????????
HELP ME! ANYONE! ???????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest