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
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Wed Feb 04, 2004 12:29 am   

Nested #FORALL Loops
 
If I have one #FORALL loop, and inside that loop I have another couple of #FORALLs, how do I access %i from the nested #FORALL?

For example:

#FORALL @vall {
#VARIABLE vcurrenttype {%i}
#FORALL %eval( %concat( "@v", %lower( %i))) {#ECHO {%ansi( high, green)@vcurrenttype - Full: %i}}
}


The %1 in red is the one that needs to be accessing the nested FORALL loop instead of the top-level FORALL.

Thanks!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Feb 04, 2004 2:46 am   
 
Use %j for the next one and so on
Reply with quote
Jezuit
Beginner


Joined: 02 Nov 2002
Posts: 27
Location: USA

PostPosted: Wed Feb 04, 2004 2:48 am   
 
Thanks, I doubt I ever would've seen that.
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