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
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Thu Jun 26, 2003 9:31 pm   

#forall %find
 
Hi

My database is open and my trigger is ok, but it wont search the database it keeps sending the first record or the one that I have select in the database.

I cant see what Iam doing worng ?

can it be a bug in version 6.62..

This is the output from my mud:

Phase 1: Visit a domestic woman.
Phase 2: Visit Anjou Morgan.
Phase 3: Visit Josefina Smythe.
Phase 4: Visit an elderly person.
Phase 5: Visit a resident.

This is my trigger:
#TRIGGER {Phase *: (&VarName)} {#FORALL %find( @VarName, Phase) { #SHOW &room - &zone};#SHOW @VarName}

Gasolin
Denmark
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Jun 27, 2003 6:19 pm   
 
ah, it looks like %find isn't changing the current database pointer. instead of
#show &room - &zone
try
#show %i.room - %i.zone
Reply with quote
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Fri Jun 27, 2003 7:34 pm   
 
Ok something works now, with the new change, this is what I get with this mud output:
Phase 1: Visit a domestic woman.

4qu.room - 4qu.zone
Visit a domestic woman.

4qu is the right record, but it only shows room insted of Market Street and zoon sould be tellerium.
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Jun 27, 2003 8:04 pm   
 
the operators are being evaluated in the wrong order, or you need the @ that i left out (more likely). try
#show @{%i}.room - @{%i}.zone
or
#show @{%i.room} - @{%i.zone}
Reply with quote
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Sat Jun 28, 2003 8:37 am   
 
Thanks alot, it works now with the #show @{%i.room} - @{%i.zone}.

btw is there a way to put the #show line after the mud output insted under it, this is what I have now.

Phase 1: Visit a domestic woman.
Market Street - Tellerium

This is what I will like to have:
Phase 1: Visit a domestic woman. Market Street - Tellerium
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Jun 28, 2003 8:54 am   
 
sure, this _should_ work for you. its kinda late though so i might have messed up the expansion order again. if it doesn't try other/more bracket placements around the temp database vars.

#TRIGGER {(Phase *: &VarName)} {
#var temp %find(@VarName,Phase)
#SUB {%1 @{@temp.room} - @{@temp.zone}}
}
Reply with quote
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Sat Jun 28, 2003 3:19 pm   
 
Sorry to disturbing you agian.

this is what the editor says:
Code:
#SUB {%1 @{@temp.room} - @{@temp.zone}}
          ^ syntax error


I have try to change and supply with () {} and remove some, but no matter what I do I cant get it to work.
Reply with quote
gasolin
Novice


Joined: 17 Aug 2002
Posts: 31
Location: Denmark

PostPosted: Sat Jun 28, 2003 3:19 pm   
 
Sorry to disturbing you agian.

this is what the editor says:
Code:
#SUB {%1 @{@temp.room} - @{@temp.zone}}
          ^ syntax error


I have try to change and supply with () {} and remove some, but no matter what I do I cant get it to work.
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Jun 28, 2003 6:39 pm   
 
i'm sorry, i posted that at 3 am and wasn't thinking very clearly.

#sub {%1 @temp.room - @temp.zone}

should work fine for you
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