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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Mon Nov 15, 2010 8:31 am   

%t1
 
For some reason when i use %t1 here I am getting a null value, any idea why?
Code:
<trigger priority="330" id="33">
  <pattern>You slowly scatter some viable (%w) seeds*over the surface of </pattern>
  <trigger>
    <pattern>Without disturbing the contents, you move a tray filled with soil covered</pattern>
    <value>#WAIT 5000
plant %t1-seeds</value>
  </trigger>
</trigger>
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Mon Nov 15, 2010 9:38 am   
 
seems to have self corrected itself... disregaurd

Or so I thought... this seems to be losing the definition of %t1 only occasionally... the number of lines between the two messages is variable (11 or more).
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 15, 2010 5:47 pm   
 
As a workaround, just do something like this:
Code:
$seeds %1
#WAIT 5000
plant %concat($seeds,"-seeds")
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Mon Nov 15, 2010 8:07 pm   
 
Do local variables declared in a trigger also work in that triggers conditions?
_________________
Discord: Shalimarwildcat
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 15, 2010 9:47 pm   
 
1)the %tX variables are only populated with non-null values. Even if you explicitly pattern-match for it, CMud will automatically assign the next captured non-null value to %tX (this is annoying, because the same behavior does not exist in the %X variable list.)

2)local variables declared in State X do not work in States not equal to X.
_________________
EDIT: I didn't like my old signature
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