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


Joined: 17 Jan 2004
Posts: 5

PostPosted: Sat Jan 17, 2004 8:55 am   

wholist checker and stringlists
 
I have @friends john|quen|neal
#Forall @friends {who %i}'.that runs great but because that only displays name if not on.
#trig {No matches for '(%w)'.}{#DELITEM @friends %1} it is not deleating from the list
I then wanted it to #sh @friends
but what it is doing instead of deleating it is creating a new list say quen is the only one on it is creating a list with the value of john|neal
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Jan 17, 2004 9:02 am   
 
#trig {No matches for '(%w)'.} {#delitem friends %1}

Basicly just remove the @ from the variable name

DELITEM

Syntax: #DELI stringlist item
Related: #ADDITEM

Deletes the specified item from the stringlist. If item exists in the stringlist more than once, then all occurrences of item in the list are deleted. To only delete the first item when working with duplicates, use the %delitem function.

DELITEM Example

#DELITEM Friends Zugg

Removes "Zugg" from the stringlist Friend
Reply with quote
jjf
Newbie


Joined: 17 Jan 2004
Posts: 5

PostPosted: Sat Jan 17, 2004 9:21 am   
 
quote:
Originally posted by jjf

I have @friends john|quen|neal
#Forall @friends {who %i}'.that runs great but because that only displays name if not on.
#trig {No matches for '(%w)'.}{#DELITEM @friends %1} it is not deleating from the list
I then wanted it to #sh @friends
but what it is doing instead of deleating it is creating a new list say quen is the only one on it is creating a list with the value of john|neal
Just figured that out. But 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