|
geosmith Wanderer
Joined: 23 Apr 2005 Posts: 57
|
Posted: 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..
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Oracle Apprentice
Joined: 29 May 2002 Posts: 121
|
Posted: 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. |
|
|
|
|
|