|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Wed Apr 20, 2005 4:08 am
Need help expanding vars in loop. |
Alright I have this loop and basicly what I want to happen is create a group of triggers with patterns that are determined by values in a couple of arrays.
What I want for example would be a trigger with a pattern of "You see a small bag." and with the action "probe bag10231"
But what I'm coming out with is a trigger with a pattern of "You see @Descs.1" and the action of "probe @IDs.1" This only works until the variables change.
#Loop @listLen {
#Trigger {You see @Descs.%{i}.} {probe @IDs.%{i}} {Misc}
} |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Wed Apr 20, 2005 5:26 am |
Use #exec so it parses it
e.g
#loop @listLen {
#exec {#trigger {You see @Descs.%i.} {probe @IDs.%i} {misc}}
} |
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Fri Apr 22, 2005 11:25 pm |
Alright, I tried that. It gives me a syntax error pointing at the '#' in #Trigger.
|
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Mon Apr 25, 2005 2:20 pm |
Yeah I'm getting that syntax error also, but it still works for me. Zmud editor is a little picky sometimes, might just be a spacing issue or something similar.
|
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Mon Apr 25, 2005 2:20 pm |
don't mind the sytax error if it works, sometime it will say there is an error when there is not.
|
|
_________________ megamog75
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere |
|
|
|
|
|