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
zzyzzyzzx
Beginner


Joined: 24 Oct 2006
Posts: 13

PostPosted: Thu Mar 01, 2007 11:20 pm   

vars
 
is there a way in a script that uses vars insted of pulling every single thing in the var it only pulls the top item?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Mar 01, 2007 11:49 pm   
 
If you mean a stringlist variable create with #additem or %additem then there are a number of ways depending on what you want to do. One of %pop and %item are probably what you're after.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Mar 01, 2007 11:50 pm   
 
%item(@stringlist, 1)
_________________
EDIT: I didn't like my old signature
Reply with quote
zzyzzyzzx
Beginner


Joined: 24 Oct 2006
Posts: 13

PostPosted: Thu Mar 01, 2007 11:51 pm   
 
i use #additem already to put names into the var so i can use %pop or %item to pull the name out?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Thu Mar 01, 2007 11:56 pm   
 
If you use %pop you will also delete the item. If you use %item(@stringlist, 1) you will leave the item on the list. Yes you can use either.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
zzyzzyzzx
Beginner


Joined: 24 Oct 2006
Posts: 13

PostPosted: Fri Mar 02, 2007 12:01 am   
 
i want it delete because its just readed to bottom of the list after all is said and done
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