Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
fhqwhgad
Novice


Joined: 07 Feb 2005
Posts: 38

PostPosted: Tue Dec 11, 2007 1:50 pm   

array in cmud
 
Hi,
I'm trying to create an array of values to call in a script, but i'm not entirely sure how to do it, and i don't really get the helps. I'm not sure array is what i want it to be, in Cmud.

Basicly i want array @a to have 5 values.
@a {
1
2
3
4
5
}

If i could then call @a(3) to get value 3 (in this case 3) it would be great.
Is this even possible, and if so, how do i do it?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Dec 11, 2007 2:07 pm   
 
#var a {1|2|3|4|5}
#SHOW @A.3

This is called a string list. To add things to it you would use #additem or %additem
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
fhqwhgad
Novice


Joined: 07 Feb 2005
Posts: 38

PostPosted: Tue Dec 11, 2007 2:17 pm   
 
Arminas wrote:
#var a {1|2|3|4|5}
#SHOW @A.3

This is called a string list. To add things to it you would use #additem or %additem

Thank you.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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