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
Zodican
Wanderer


Joined: 10 Oct 2000
Posts: 56
Location: USA

PostPosted: Tue Jan 07, 2003 12:13 am   

Lists Question
 
Is there a way to remove a certain item number from a list? For instance, I have a list that contains many numbers, some of which happen to be the same. This list coincides with another list that has a list of strings. Basically, I need the list of numbers to stay coincidental with the list of strings. To do this, I need a certain item NUMBER removed from the list of numbers, not a certain string.

I was going to use %delitem, but it removes a string, not an item number. And I can't use %delitem along with %item because, as I mentioned above, some of the numbers in the list are the same.

If anyone understands all that, basically I need to know if it's possible to delete an item number from a list.
Reply with quote
Zodican
Wanderer


Joined: 10 Oct 2000
Posts: 56
Location: USA

PostPosted: Tue Jan 07, 2003 12:25 am   
 
Well I just thought of an extremely complicated way to do this using a loop and an if statement and some other things, but if anyone knows a much easier way to do it please let me know.

-Zodican
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Jan 07, 2003 1:41 am   
 
you'll want to use the command
#delnitem
which will delete an item from a string list by its numerical index
Reply with quote
Zodican
Wanderer


Joined: 10 Oct 2000
Posts: 56
Location: USA

PostPosted: Tue Jan 07, 2003 1:55 am   
 
Ah yes! Exactly what I need! Thanks. :)
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