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
Bleylocke
Newbie


Joined: 12 Nov 2000
Posts: 3

PostPosted: Fri Dec 26, 2003 5:30 am   

Referencing Default Value in Variables
 
Is it possible to reference the default value that is set for a variable instead of the current value?

Thanks.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Dec 26, 2003 3:06 pm   
 
No.
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Fri Dec 26, 2003 9:05 pm   
 
Actually, the answer is technically yes.

#SAY %mss( sess.GetVar("variable name", "class name").Default, "vbscript")

Note, the code as given will generate an error if the variable does not exist. To fix this, the output from GetVar would be stored in a variable and compared to Nothing before trying to get the Default property. Also, it should abort if the ObjType property is not 3 (objVar).
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