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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Ayclaes
Newbie


Joined: 31 Mar 2005
Posts: 9

PostPosted: Mon Apr 04, 2005 12:23 am   

Problem evaluating first and last entries in a string list
 
I'm just having a problem with my triggers not evaluating the first and last entries in a string list. The code and concept are quite simple, but I've added 'spacers' at the beginning and end of the list to get it to highlight. Any ideas?

#CLASS {Games}
#ALIAS gtb {@gteamb = %push( "%1", @gteamb);#ECHO Name : %1;#ECHO Blue List : @gteamb}
#ALIAS gtr {@gteamr = %push( "%1", @gteamr);#ECHO Name : %1;#ECHO Red List : @gteamr}
#ALIAS gtw {@gteamw = %push( "%1", @gteamw);#ECHO Name : %1;#ECHO White List : @gteamw}
#ALIAS gteamreset {#VARIABLE gteamb "spacer";#VARIABLE gteamr "spacer";#VARIABLE gteamw "spacer";#ECHO Blue, Red, and White team lists are reset.}
#ALIAS gteamlist {#ECHO This is the blue team : <@gteamb>;#ECHO This is the red team : <@gteamr>;#ECHO This is the white team : <@gteamw>}
#ALIAS gteamsay {say This is the blue team : <@gteamb>;say This is the red team : <@gteamr>;say This is the white team : <@gteamw>}
#ALIAS gteamfinish {@gteamb = %push( spacer, @gteamb);@gteamr = %push( spacer, @gteamr);@gteamw = %push( spacer, @gteamw);#WAIT 250;gteamlist}
#ALIAS gameshelp {#ECHO Note that zmud won't parse the first and last entries of the lists...hence the spacers;#ECHO Use the 3 aliases to enter teams:;#ECHO gtb <name> adds that name to the blue list;#ECHO gtr <name> adds that name to the red list;#ECHO gtw <name> adds that name to the white list;#ECHO gteamfinish Puts a spacer on all the lists;#ECHO gteamreset resets all the lists;#ECHO gteamlist list all the teams (locally in an echo);#ECHO gteamsay says all the teams for others}
#TRIGGER {{<@gteamb>}} {#CW blue}
#TRIGGER {{<@gteamr>}} {#CW red}
#TRIGGER {{<@gteamw>}} {#CW white}
#CLASS 0
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 04, 2005 2:59 am   
 
You've got three triggers with a stringlist pattern using what appears to be the early-expansion brackets (I forget what the HTML brackets are for in trigger patterns...). Perhaps the trigger parser is thinking you need "<firstitem" and "lastitem>" for the ends of the list?
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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