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
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Sun Jul 21, 2002 5:17 pm   

Adding a Variable to an Alias Name
 
Hi there.
I have a whole bunch of buttons that are essentially the same thing, so I thought I'd create them with a loop. I use the counter number to identify them and this works fine for the IDname and the Caption, but I can't get the Alias name to add the variable name to it.

This is my snipet.
#VAR Counter {}

#UNTIL (@Counter>@MaxNumber) {
#BUTTON ButtonID@Counter {Caption@Counter} {AliasName@Counter} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {Testing} {} {} {} {3}
#ADD Counter 1
}


I've tried () {} and combinations of two of them around the variable in the AliasName part but just can't figure out how to get it expand.

Any ideas?


Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 21, 2002 5:57 pm   
 
#EXEC %concat("#BUTTON ButtonID",@Counter," {Caption",@Counter,"} {AliasName",@Counter,"} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {Testing} {} {} {} {3}")
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Sun Jul 21, 2002 6:05 pm   
 
You're good! I wouldn't have figured that out ever.

Thanks!

Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Sun Jul 21, 2002 7:59 pm   
 
Try

#VAR Counter 0
#VAR MaxNumber 10
#UNTIL (@Counter>@MaxNumber) {#BUTTON ButtonID@{Counter} {Caption@{Counter}} {AliasName@{Counter}} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {Testing} {} {} {} {3};#ADD Counter 1}



 - Charbal
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