Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
bdragon125
Beginner


Joined: 05 Nov 2001
Posts: 12
Location: United Kingdom

PostPosted: Sun Nov 17, 2002 11:02 pm   

problems with vars
 

ok This I have in a alias called 'nameset'

#var @TempNameVar nill
@TempNameVar.Adj = @TempAdjVar
@TempNameVar.Sex = @TempSexVar
@TempNameVar.Race = @TempRaceVar
#echo @TempNameVar is a @TempNameVar.Adj @TempNameVar.Sex @TempNameVar.Race

this bottom line is to check that data has been recorded correctly. the prevouis part taht colects the data and stored it into the temp vars works fine, its just this bit I'm having probles with getting it into a record var thats labled with the char's name.
please tell me what I'v done wrong.

BD

~(,,,,)'>
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 18, 2002 1:12 am   
 
quote:


ok This I have in a alias called 'nameset'

#var @TempNameVar nill
@TempNameVar.Adj = @TempAdjVar
@TempNameVar.Sex = @TempSexVar
@TempNameVar.Race = @TempRaceVar
#echo @TempNameVar is a @TempNameVar.Adj @TempNameVar.Sex @TempNameVar.Race

this bottom line is to check that data has been recorded correctly. the prevouis part taht colects the data and stored it into the temp vars works fine, its just this bit I'm having probles with getting it into a record var thats labled with the char's name.
please tell me what I'v done wrong.

BD

~(,,,,)'>



When using the a=b syntax, you don't need the @ in front of the variable name. I could be wrong about why, but I think having that there transforms it from an assignment line to an equality check (ie, 1 = 1, 1 <> 1, 1 <= 1, etc).

li'l shmoe of Dragon's Gate MUD
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 18, 2002 1:19 am   
 
#VAR TempNameVar %null
TempNameVar.Name = put the name here
TempNameVar.Adj = @TempAdjVar
TempNameVar.Sex = @TempSexVar
TempNameVar.Race = @TempRaceVar
#ECHO {@TempNameVar.Name is a TempNameVar.Adj TempNameVar.Sex TempNameVar.Race}

LightBulb
Senior Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net