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


Joined: 01 May 2002
Posts: 0

PostPosted: Thu Apr 04, 2002 8:50 pm   

FORALL into a #PICK List
 
I want to transfer everything in a String Var into a Pick list
The problem here is there could be anywhere between 30 and 100 items in the string variable...

I know i could do...
#FORALL @StringVar {
#IF (@var1 = "") {@var1 = %i}
#IF (@var2 = "") {@var2 = %i}
}
#PICK {p:Choose One} {@var1:Null} {@var2:Null}

And on and on...
But with different ammounts in the StringVar it could quite long or quite short, is there any other way to do this that I'm not thinking of?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Apr 04, 2002 9:56 pm   
 
A stringlist is a possible argument for #PICK. You can just do:
#PICK @StringVar

Kjata
Reply with quote
Buba
Newbie


Joined: 01 May 2002
Posts: 0

PostPosted: Fri Apr 05, 2002 2:11 am   
 
Well that is so handy I would have never thought of that, next question what if i still want a title for the PICK window
like
#PICK {p:Pick the user}
Do i just add {@StringVar} to the end? I can prolly play with it and figure it out
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Apr 05, 2002 2:54 am   
 
The title should be the first item in the stringlist. You can probably concatenate it.
#PICK {p:Pick the user|@StringVar}

LightBulb
All scripts untested unless otherwise noted
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