Difference between revisions of "ListItemDelete"

From Second Life Wiki
Jump to: navigation, search
(New page: {{LSL Header}} __NOTOC__ <div id="box"> == Function: list ListItemDelete(list {{LSL Param|mylist}}, string {{LSL Param|element}}); == <div style="padding: 0.5em;"> Removes one ...)
 
Line 15: Line 15:
  
 
</lsl>
 
</lsl>
 +
 +
list myShortenedList = ListItemDelete(mylist,"Brown");
  
  

Revision as of 05:47, 13 July 2008

Function: list ListItemDelete(list mylist, string element);

Removes one item from a list.

See also: Lists

<lsl> list ListItemDelete(list mylist,string element_old) {

   integer placeinlist = llListFindList(mylist, [element_old]);
   list newlist = llDeleteSubList(mylist, placeinlist, placeinlist);
   return newlist;

}

</lsl>

list myShortenedList = ListItemDelete(mylist,"Brown");