About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Jun 04, 2007 8:40 pm   

Multistate Looplines Thing
 
Hi

I have a looplines|param=99 multi-state trigger like this:

state 0

pattern: You see the following people here:
command: #delkey allplayers unknown

state 1 (does loops lines)

pattern: (just left blank)
command: #IF (%match( %line, %d)) {
Nsort
#STATE enemyck 0
} {#addkey allplayers unknown %concat( @allplayers.unknown, %line)}


this works but I am having a problem with processing for example:

You see the following people here:
Leitia,JoeBobGuy
2408h, 3671m xdb-

In the above text the trigger hangs at state 1 till it gets another line like:

(Market): BettySueGirl says, "Seeking info on JoeBobGuy."
2408h, 3671m xdb-

Then it processes. I have seen this in other triggers too. What don't I know? please.


**********************

#TRIGGER "enemyck" {You see the following people here:} {#delkey allplayers unknown} "views"
#COND {} {#IF (%match( %line, %d)) {Nsort;#STATE enemyck 0} {#addkey allplayers unknown %concat( @allplayers.unknown, %line)}} {looplines|param=99}
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Jun 04, 2007 11:15 pm   
 
I'm not sure if by "hanging" you mean that the state never fires, or if it keeps adding the lines to the unknown key. If it's the latter, try giving your trigger a pattern to look for, like "*". You might find it matches then.

If the %match function is never returning true, it's probably because zMUD is interpreting the %d as a variable call rather than a string. Try putting quotes round it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Fri Jun 15, 2007 4:42 pm   
 
Thanks, "*" did not help, though I will try testing %d as a variable, sorry for the lateness
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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