|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed May 28, 2008 11:23 am |
...you've not got an #alias command at the start.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
|
|