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
Rennus
Beginner


Joined: 30 Dec 2003
Posts: 22
Location: USA

PostPosted: Mon Apr 26, 2004 3:11 am   

Case of the disapearing variables
 
It was a dark and stormy night...

Here's the background:
I am capturing MUD output into variables, concatenating them into strings and storing them into a string list.

The string list is initialized as follows:
Code:

#var somevariable {} {} {some|class}


Then as information is picked up from the mud, strings are added using:
Code:

#additem @somevariable {@bldstr}


All is fine.. all is good.. UNTIL I disconnect, at which point all information that was stored in @somevariable goes missing.

Any ideas on how to keep information in dynamically created variables from resetting when the client disconnects?

Thanks in advance for your input.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Apr 26, 2004 3:39 am   
 
You are defining you variables with a default of nul. They are being reset to default. Either turn off the use default box for them in the settings editor or redefine them with '#var somevariable {@somevariable} {_nodef} {some|class}'
Reply with quote
Rennus
Beginner


Joined: 30 Dec 2003
Posts: 22
Location: USA

PostPosted: Mon Apr 26, 2004 10:25 am   
 
I tried turning off the "use default" checkbox.. I'll give the _nodef a shot. Thanks.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Apr 26, 2004 12:16 pm   
 
Also, you use a syntax of #additem @somevariable {@bldstr}. It should be:
#additem somevariable {@bldstr}
Reply with quote
Rennus
Beginner


Joined: 30 Dec 2003
Posts: 22
Location: USA

PostPosted: Tue Apr 27, 2004 9:54 am   
 
Anyone else having this problem... Vijilante had the solution. #var varname {data} {_NODEF} {some|class}
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