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
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Sat Jul 23, 2005 6:22 am   

Default values
 
Is it possible to specify a default value for a variable such that it can be reset using the #RESET (CLASSNAME) command, but at the same time not have it reset to this default when zMUD is closed? Basically I want to end up with a bunch of variables which I can easily reset manually, but which will retain their values between sessions..
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jul 23, 2005 4:03 pm   
 
Nope, no way with the inherent zmud stuff (ie, a neat, little command doing what you ask). Your best bet is probably going to be an alias called Reset or something that does the #RESET command plus tracks and modifies specific variables.
_________________
EDIT: I didn't like my old signature
Reply with quote
Oracle
Apprentice


Joined: 29 May 2002
Posts: 121

PostPosted: Sat Jul 23, 2005 5:10 pm   
 
Geosmith.. I had the same question and this was my solution.

Within my script, I force Zmud to store each variable in a general location upon creation. When I want to give a copy of my script to someone else, I would delete all the variables in that folder so that my settings aren't transferred to someone else. The same theory could possibly be used for what you are asking as well, with a little thought.

#IF (%defined( VThought_ignore_list)) {#NOOP} {#VARIABLE VThought_ignore_list %null {_nodef} {Script_Data}}

Basically, this stated checks if the variable exists and if it does, then it continues. If the variable doesn't exist then the variable is set with a default value.
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