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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Thu May 22, 2008 9:42 pm   

broken alias?
 
it only seems to work when i type go telgoran but go jungle and go help are defunct... in other words, when i type the former, it does the command, but when i do the two latter, it does nothing. what am i missing? =**[

Code:
<alias name="go" id="293">
  <value>#IF (%1 = "telgoran") {#2 n;#6 e;s;#2 e;s;#2 e;s;#18 e;#4 s;#4 e;#2 s;#4 e;#4 n;#3 e;n;w;n;emote has arrived!}
#IF (%1 = "jungle") {#2 n;#6 e;#5 s;emote has arrived!}
#IF (%1 = "help") {#WINDOW {misc} {%ansi( white) AutoWalk Commands and Locations};#WINDOW {misc} {%ansi( white) ~[telgoran~] - Telgoran};#WINDOW {misc} {%ansi( white) ~[jungle~] - Jungle}}</value>
</alias>
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri May 23, 2008 2:55 am   
 
Why not use #SWITCH instead of all these #IFs? Change it to:

Code:
#ALIAS go {#SWITCH (%1) ("telgoran") {commands here} ("jungle") {commands here} ("help") {commands here}}


It looks cleaner and should have no problems with jungle and help. However, unless you put a fail command at the end, if you typo something, it won't return anything.

Charneus
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri May 23, 2008 1:21 pm   
 
The original code works for me, I don't know why it isn't for you. I could make some other suggestions to make the code look nicer, but it should work fine as it is.
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Fri May 23, 2008 2:05 pm   
 
i wonder if i have something else that might be affecting this command? i'm gonna try the #switch that does look very much cleaner, that... and i think it'll be replacing a TON of my #if's statements... LoL
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