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
eclpmb
Novice


Joined: 29 Feb 2004
Posts: 36
Location: United Kingdom

PostPosted: 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?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
Reply with quote
eclpmb
Novice


Joined: 29 Feb 2004
Posts: 36
Location: United Kingdom

PostPosted: 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.
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Sun Jul 20, 2008 8:16 pm   
 
#TR {{@sellitems}}, not {@{sellitems}}
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
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