Affecting a text value to a string variable?

Non-platform specific questions.

Affecting a text value to a string variable?

Postby regis » Wed Aug 31, 2005 7:44 pm

Hello to everybody,

As you may know, I have been developping for 1 year a precalculated 3D shooter game using GE: I am very very close to the end right now (a few days more!).

Currently, I have the following problem: how may I affect a text value to a string variable?

My purpose is to associate a player's name (let's say "Mr X") to a special HiScore value (10000 for instance), and, then, save both variables (let's call them "NameVar" and "ScoreVar") using the "saveVar" script method.

I would like to know the right syntax/method equivalent to the following "code":

ScoreVar = 10000;
NameVar = "Mr X";

Of course, this does not work! :cry:
Have you any suggestion that would be very helpful? :idea:
Many thanks in advance to the GE community! :D

Best Regards,

Regis
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score

Postby BeyondtheTech » Wed Aug 31, 2005 8:24 pm

ScoreVar=10000;
strcpy(NameVar,"Mr X");
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Affecting a text value to a string variable?

Postby regis » Fri Sep 02, 2005 7:19 am

Many thanks BeyondtheTech!
This perfectly works :wink:
Regis
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron