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
cazador
Apprentice


Joined: 08 Dec 2005
Posts: 108

PostPosted: Wed Apr 14, 2010 5:19 pm   

[cmud 3.16b pro] list variables in pattern match doesn't work
 
I have a variable named @t. Which I have 2 items in it. If there is only the "You are surrounded by a windwoven cloak of air." in it it will match that line. If i had a second item 't' it will not match.
Code:

<class name="defenses" id="65">
  <trigger priority="660" enabled="false" id="66">
    <pattern>^(You are surrounded by a windwoven cloak of air.)$</pattern>
    <value>#SUB {[WINDWEAVE] %1}
</value>
  </trigger>
  <var name="t" type="StringList" id="67">You are surrounded by a windwoven cloak of air.|t</var>
  <trigger priority="680" id="68">
    <pattern>@t</pattern>
    <value>#SEND {hit}
</value>
  </trigger>
</class>


I am using to test

Code:

#show {You are surrounded by a windwoven cloak of air.}


Note this also doesn't work with database variables[/code]
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Apr 14, 2010 5:40 pm   
 
When you want to match on elements from a stringlist you must include the {}. Your pattern should be {@t}.
_________________
EDIT: I didn't like my old signature
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