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


Joined: 05 Dec 2003
Posts: 4

PostPosted: Thu Dec 18, 2003 2:07 am   

Possible to add items to the end of a list var?
 
I've created a system which cues commands to send to the mud based on certain triggers using lists. Unfortunately, the only way I've found to be able to add items to the list (or pop them off) is at the head of the list. So the last command added to the list, will be the first one executed. This works fine for most things, but somethings need to be done in a certain sequence, and it is not always possible to pre-determine the sequence.

So, what I would like to be able to do, is have the option to add my items to the end of the list, so I could build these sequences in the list on the fly as I need them.

Anyone have any suggestions on how to do that?
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Thu Dec 18, 2003 2:48 am   
 
I might be missing something as I only have access to the help files right now. According to the help file example...%additem shows that list additions go to the end of the list.

#VAR ToDo {kill orc|kill goblin}
#VAR ToDo %addItem("kill orc",@ToDo)
#SHOW @ToDo

displays:

kill orc|kill goblin|kill orc


I'll see if i can do some testing later tonight.
Reply with quote
Lideron
Newbie


Joined: 05 Dec 2003
Posts: 4

PostPosted: Thu Dec 18, 2003 3:43 am   
 
Doh, you are indeed correct, it was working that way before, somehow I'd managed to confuse myself. My apologies.
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