|
tbone235 Apprentice
Joined: 02 Nov 2002 Posts: 107 Location: Australia
|
Posted: Sat Feb 01, 2003 3:04 am
Saving a variable |
Ok, I'm making a spellup script and i have a list that is generated with all my spells that i can cast in it, but when i shut down zmud it clears the list... how can i stop it from doing this so it always holds my spellup list?
thanks |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Feb 01, 2003 4:43 am |
Uncheck the "Use Default Value" for that variable
|
|
|
|
tbone235 Apprentice
Joined: 02 Nov 2002 Posts: 107 Location: Australia
|
Posted: Sat Feb 01, 2003 9:03 am |
ok, so how can i write that into my script so that it doesn't use default value, IE, if i give this script to other ppl how can i make it so that they dont have to touch the variables
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Feb 01, 2003 1:21 pm |
Don't give the variable a default value when creating it. This is the syntax for #VAR:
#VAR name value default class
As you can see, if you specify only the first two arguments, then no default value is used. It might not always be clear when you are specifying a third argument since somethign matched with a trigger and contained in %1, for example, might contain spaces in it which would put the second word as the default value. So, as a general rule, enclose these arguments in curly braces:
#VAR myVar {%1}
However, if you need to specify a class for the variable being created, leaving the default value blank will just give the variable a default value of an empty string, which is not what you want. For that, you sue the special _nodef value:
#VAR myVar {This is the value} _nodef myClass
Kjata |
|
|
|
|
|