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
ccogdill
Beginner


Joined: 16 Jul 2002
Posts: 27

PostPosted: Sat Oct 27, 2007 5:57 pm   

Trigger With Variable Doesn't fire.
 
I created a trigger with a stringlist variable in it, then put the variable in a trigger.

Like so:
#VAR Channel {say|says} {_nodef} "chat2"
#TRIGGER {%w {@Channel}} {#CAPTURE (1) tell} "chat2" <- This trigger does not work.
#TRIGGER {%w {say|says}} {#CAPTURE (1) tell} "chat2" <- This trigger works great.


You say 'blah' should go to the tell window but the one with the variable doesn't work.


I dumped this from a zMud where it was working perfectly.
Reply with quote
ccogdill
Beginner


Joined: 16 Jul 2002
Posts: 27

PostPosted: Sat Oct 27, 2007 5:58 pm   
 
Um the above was in the latest version of cMud beta 2.09
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Oct 27, 2007 6:28 pm   
 
That exact code entered on a the command line of the untitled session works fine for me. Try that yourself and see if that fails.

If it doesn't, check your package. Make sure that the variable's type is stringlist and that the two items really are separate. Check that the trigger script and pattern are compiling properly. Make sure that both are enabled.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ccogdill
Beginner


Joined: 16 Jul 2002
Posts: 27

PostPosted: Sat Oct 27, 2007 6:59 pm   
 
Ok I figured out what went wrong. I had a few more strings in my stringlist besides {say|says} there was:

#VAR Channel {tell the group|Q/A|gloats|say|tells|shouts|chats:|clans|shout|gossip|chat:|says|tells you|grats|ramble|clan|gossips|grat|tell|tells the group|reveals {his|her|their} wisdom about}

There was actually a stringlist inside a stringlist. Which when seperated now works. Although I did test it with just the {say|says} in there and it didn't work properly, but now it works so you can just move to the next subject.

Thanks for your reply.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Oct 28, 2007 3:36 am   
 
Yes, wildcards don't work inside the {one|two} syntax. You can use regexes instead if you want that.
_________________
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 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