|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Sat Apr 03, 2004 7:08 pm
using Var's as objects -- syntax |
#VAR var1 0 0 test will create var1 with value 0 and default value 0 located in class "test"
#var var1.option1 0 0 test
#var var1.option2 "m0nkeY" "m0nkeY" test
This is not setting the option1 and option2 default values. Instead it seems to be setting the last default value to var1. What am I doing wrong? |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Sat Apr 03, 2004 7:37 pm |
I think var1.option1 and var1.option2 are both being read as var1.1.
var1.1 denotes the first element in a zMUD array or zMUD string list.
EDIT: Oops I typo'd element as elemental. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Apr 03, 2004 11:46 pm |
Variables can only have 1 default value. It would seem your trying to make a record variable, you can set a default for a variable of this type by building the entire variable then using:
#VAR variableName {@variableName} {@variableName}
This puts then entire record contents with its special delimeter characters into the default for the variable. |
|
|
|
|
|