|
Riesz Novice
Joined: 16 May 2006 Posts: 35 Location: Plymouth, England
|
Posted: Wed Oct 11, 2006 12:11 pm
[1.09] Problems with variable names containing numbers |
Strange one with variable names containing numbers.
Using a command like..
#var 163name {1} {_nodef} {Other/Tailoring/Clothing/@clothingtype/@clothingsub}
Trying to set the variable 163name with a value will result in the creation of a new variable every time. Using a pure letter variable in this instance works.
Similarly using the %vartype function, it cannot find a variable that contains numbers as part of it's name. For instance, it could not find any of the multiple 163name's created above, returning -1 each test.
It should overwrite the value within 163name on each call of the #var, not create a new variable.
An interesting bug to say the least, heh. Also props to Zugg on the stability of this release, I found it very hard to generate pop-up error messages on general use. |
|
_________________ Elaria, Lusternia. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Oct 11, 2006 5:18 pm |
That is correct. Variables cannot start with numbers. Variables (and all identifiers, including alias names, etc) MUST start with a letter. They can contain numbers, but only after the initial letter.
zMUD was more forgiving about this and allowed all sorts of variable and alias names that CMUD doesn't allow because of the stricter parsing. |
|
|
|
Riesz Novice
Joined: 16 May 2006 Posts: 35 Location: Plymouth, England
|
Posted: Wed Oct 11, 2006 5:30 pm |
Hmm... I see. Nothing that stops me from having the number at the middle/end of the variable name, just means some recoding. Glad to know it's simply that though. Thanks for your assistance here Zugg :D
|
|
_________________ Elaria, Lusternia. |
|
|
|
|
|