New LSL list llListRemove(list, integer index);
complete
dantia Gothly
Creates a new list or updates an existing list with the specified index of the provided list removed.
There is currently no clean, easy way to remove an item from a list. This would provide a simple way to clear specific items from a list and reduce the currently needed loops and overhead to do this.
Example Useage:
list mylist = ["bob", "tom", "jack", "bill"];
mylist = llListRemove(mylist, llListFindList(mylist, ["jack"]));
Result:
mylist = ["bob", "tom", "bill"];
Log In
Spidey Linden
marked this post as
complete
Kristy Aurelia
There's no need for loops:
integer index = llListFindList(mylist, ["jack"]);
mylist = llDeleteSubList(mylist, index, index);
also you'd want to check against -1 anyway, otherwise you'd remove last item if the specific item is not found.
dantia Gothly
Kristy Aurelia it was pointed out to me after I posted this. I didn't see this function while I was looking through the list. This post isn't needed.