|
eclpmb Novice
Joined: 29 Feb 2004 Posts: 36 Location: United Kingdom
|
Posted: Sun Jul 20, 2008 5:25 pm
Problem with variable triggers |
I tried to make things as simple as possible.
I have a variable @sellitems that contains "ration|torch"
I believe this should trigger on ether the word ration or the word torch - http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=2684 says the same (@variable match any of the specified strings or keys works with string lists and record variables)
However, the only thing it works on is the string "torch|ration"
The compiled pattern is
Code: |
0000 VARPATREF @sellitems <sellitems> (class XYZ) |
Am i doing something wrong or is this a bug? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jul 20, 2008 6:41 pm |
Since it is an item list, you'll need to make CMUD realize what it is. You don't have an example of your trigger, so I'm assuming your trigger pattern is:
#TRIGGER {@sellitems}
Changing it to:
#TRIGGER {@{sellitems}}
Should work. It's untested as I'm not at home right now, but if that doesn't work, try:
#REGEX {(?:@sellitems)}
Charneus |
|
|
|
eclpmb Novice
Joined: 29 Feb 2004 Posts: 36 Location: United Kingdom
|
Posted: Sun Jul 20, 2008 7:12 pm |
#TRIGGER {@{sellitems}} compiles to exactly the same code with exactly the same problem
#REGEX {(?:@sellitems)} works.
Thank you. |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Jul 20, 2008 8:16 pm |
#TR {{@sellitems}}, not {@{sellitems}}
|
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jul 20, 2008 8:45 pm |
That's right, Caled. Thanks. I'm finally home, so I was able to check it myself. :P
Charneus |
|
|
|
|
|