|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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 |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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 |
|
|
|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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. |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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} |
|
|
|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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 |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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}}
} |
|
|
|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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. |
|
|
|
gasolin Novice
Joined: 17 Aug 2002 Posts: 31 Location: Denmark
|
Posted: 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. |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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 |
|
|
|
|
|