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
Skrud
Newbie


Joined: 01 Jun 2002
Posts: 6
Location: USA

PostPosted: Thu Jun 05, 2003 12:43 am   

#LOOPing %params difficulty.
 
Anyone know of any reason something like this wouldn't work?
#LOOP 2,%numparam {#exec %item( @%param( %i), %random( 1, %numitems( %param( @%i))))}


Basically what I want to do is substitute a line out of a stringlist from a parameter passed into it as %i. So I've got the above in an alias that loops through the parameters being passed ("red" "black" "white" "blue").

The point of this is that each color gets translated into a string in a stringlist that uses some variables to sub in the right information...

It works correctly (or as I expect at least) but it's not pulling the %random %item out of the stringlist. Instead it's pulling the whole stringlist item which is:
mix @number red blue|mix @number white grey|mix @number orange red
which is *one item* in the stringlist. The object is to get just the "mix @number red blue" and "mix @number white grey" executing as commands with the variable expanding...

There's gotta be a better way...lol
Reply with quote
Skrud
Newbie


Joined: 01 Jun 2002
Posts: 6
Location: USA

PostPosted: Thu Jun 05, 2003 1:11 am   
 
never mind. Got stuck, took a break, figured it out. Thanks though!
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