|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Sat Mar 28, 2009 3:51 pm
[2.37] #state bug? |
I'm having some issue with the #state command. It doesn't seem to be working unless you provide a trigger id. Here's an example:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger type="Manual" priority="28200">
<pattern>Test1</pattern>
<value>#state 1
#echo State 0 Fired!</value>
<trigger>
<pattern>Test2</pattern>
<value>#echo State 1 Fired!</value>
</trigger>
</trigger>
</cmud> |
I punch #echo Test1 into the command prompt and the first state fires. I then put in #echo Test2 and nothing happens. Looking at the settings it looks like it never switches to the 2nd state. If I assign an id to the trigger it works fine. Is this not it's intended use? I'm fairly positive this worked in ZMUD and the CMUD help files shows this as a correct use of the command. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sat Mar 28, 2009 4:25 pm |
I'm not entirely sure you can even have Manual state as your primary trigger, but then again I've never tried it myself and can't be sure.
|
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Sat Mar 28, 2009 4:37 pm |
Progonoi wrote: |
I'm not entirely sure you can even have Manual state as your primary trigger, but then again I've never tried it myself and can't be sure. |
Like I said, the first state triggers fine. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Mar 28, 2009 7:58 pm |
Remove Manual from the first trigger; you don't need it and it's not doing anything anyway. Then remove the #state 1 command from your first state. It should work then.
|
|
|
|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Sun Mar 29, 2009 1:59 am |
Fang Xianfu wrote: |
Remove Manual from the first trigger; you don't need it and it's not doing anything anyway. Then remove the #state 1 command from your first state. It should work then. |
It was just an example. I already have a work around for it, which is to add an id to the trigger. I'm just trying to confirm that this is indeed a bug and if it could perhaps be fixed in the future.
It has nothing to do with the fact that I'm using a manual state:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="21990">
<pattern>Test1</pattern>
<value>#echo State 0 fired!</value>
<trigger>
<pattern>Test2</pattern>
<value>#echo State 1 fired!
#state 0</value>
</trigger>
<trigger>
<pattern>Test3</pattern>
<value>#echo State 2 Fired!</value>
</trigger>
</trigger>
</cmud> |
Same issue, State 0 Fires, State 1 Fires, the state command does nothing, and then State 2 fires.
Also, if I use #state 0 in a script after creating an alarm it will disable that alarm for some reason.
Edit: Nevermind about it working on zmud. |
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Tue Apr 14, 2009 5:39 am |
#state and #set have never worked as documented in the help without an id argument. I believe I reported that a long time ago, but a bump on that is probably a good idea :)
|
|
|
|
|
|