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


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: 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}
}
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

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


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Fri Apr 22, 2005 11:25 pm   
 
Alright, I tried that. It gives me a syntax error pointing at the '#' in #Trigger.
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: 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.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

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