Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Removing an Item off of a LIST - Please help

Karen Ash
Registered User
Join date: 17 Feb 2006
Posts: 16
01-28-2007 06:03
I have the following Code that removes everyone but the first index
Thanks for any advise you may have,.

List gstav = LOTS OF PEOPLES;
value os a string representing the avatars name

integer fnd = llListFindList(gstav, [value]); // this line appears to give me the proper index


llSay(0,"Found Request for " + value + " is " + (string)fnd);
if (fnd != -1)
{

gstav = llDeleteSubList(gstav,fnd, 1);
// the line above doesnt remove the name correctly?
}
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
01-28-2007 06:51
From: Karen Ash

CODE
gstav = llDeleteSubList(gstav,fnd, 1);
// the line above doesnt remove the name correctly?

You want:

CODE
gstav = llDeleteSubList( gstav, fnd, fnd );
The 3rd parameter of llDeleteSublist is the ending entry index of what is to be deleted, not the number of entries to be deleted.
Karen Ash
Registered User
Join date: 17 Feb 2006
Posts: 16
ahha
01-28-2007 07:19
Thanks so much, I cant wait to go try it
:)