|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 15, 2010 5:47 pm |
As a workaround, just do something like this:
Code: |
$seeds %1
#WAIT 5000
plant %concat($seeds,"-seeds") |
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon Nov 15, 2010 8:07 pm |
Do local variables declared in a trigger also work in that triggers conditions?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|