Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Riesz
Novice


Joined: 16 May 2006
Posts: 35
Location: Plymouth, England

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Riesz
Novice


Joined: 16 May 2006
Posts: 35
Location: Plymouth, England

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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