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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed May 28, 2008 11:14 am   

#switch statements in aliases
 
Can they occur? I have:

Code:

camo {
#switch (%params)
 ("all") {get headband leave}
 ("set") {rem fine}
 ("tunic") {get tunic leave}
 } {General Aliases}


Just as a test and I'm getting an extra brace error, but when I copy and paste into the editor it says there are no errors. I've tried putting switch on the line of the first brace, etc... and I can't get anything to work. What am I doing wrong? Is it even possible?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed May 28, 2008 11:23 am   
 
...you've not got an #alias command at the start.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed May 28, 2008 11:44 am   
 
Wow... that was stupid. But shouldn't the debugger find that? Say something like... "not initialized"? I suppose the unmatched braces was it, but it's odd that it was picked up by CMUD but not by CMUD's editor.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed May 28, 2008 4:59 pm   
 
No, because lines can start with words - they look like commands to be sent to the MUD. CMUD only understands that you've opened a brace (on the camo line) that you didn't then use.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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