|
ccogdill Beginner
Joined: 16 Jul 2002 Posts: 27
|
Posted: 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. |
|
|
|
ccogdill Beginner
Joined: 16 Jul 2002 Posts: 27
|
Posted: Sat Oct 27, 2007 5:58 pm |
Um the above was in the latest version of cMud beta 2.09
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
ccogdill Beginner
Joined: 16 Jul 2002 Posts: 27
|
Posted: 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. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
|
|