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
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: 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.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: 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
--------------------------------
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: 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.
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

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