Difference between revisions of "Talk:LlRemoveInventory"

From Second Life Wiki
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
== removing inventory can be laggy like Schroedingers Cat. ==
== removing inventory can be laggy like Schroedingers Cat. ==


//I think if you remove an inventory item via llRemoveInventory(name) within procedure b() and then try to remove an item of the same name by using procedure b() again, that procedure can actually PASS its build-in if(llGetInventoryType(n)!=-1){} condition and try to remove the item again, when the item does not exist anymore and should not have passed that condition in the first place, because the same procedure removed the item earlier.
I think if you remove an inventory item via [[llRemoveInventory]](name) within procedure b() and then try to remove an item of the same name by using procedure b() again, that procedure can actually PASS its build-in if([[llGetInventoryType]](n)!=-1){} condition and try to remove the item again, when the item does not exist anymore and should not have passed that condition in the first place, because the same procedure removed the item earlier.
//procedure b() is this:


 
procedure b() is this:
removeinv(string name)
<lsl>removeinv(string name)
{
{
     if(llGetInventoryType(n)!=-1){
     if(llGetInventoryType(name)!=-1){
         llOwnerSay(name+" has an inventory type, therefore it exists. killing it with fire");
         llOwnerSay(name+" has an inventory type, therefore it exists. killing it with fire");
         llRemoveInventory(name);
         llRemoveInventory(name);
         llOwnerSay(name+" should be dead by now);
         llOwnerSay(name+" should be dead by now);
     }
     }
}
}</lsl>


//but that may depend on how rapidly and under what conditions b() is triggered. (maybe when its triggered twice within CHANGED_INVENTORY matters)
but that may depend on how rapidly and under what conditions b() is triggered. (maybe when its triggered twice within [[CHANGED_INVENTORY]] matters) whatever, it seems to fail too often to check if the item exists before deleting it. It may have been deleted by other means. {{Unsigned|Ollj Oh‎}}
//whatever, it seems to fail too often to ckeck if the item exists before deleting it. It may have been deleted by other means.

Latest revision as of 10:21, 25 December 2008

how much does the script sleep? how much does a deletion take if I must delete several inventory objects?

removing inventory can be laggy like Schroedingers Cat.

I think if you remove an inventory item via llRemoveInventory(name) within procedure b() and then try to remove an item of the same name by using procedure b() again, that procedure can actually PASS its build-in if(llGetInventoryType(n)!=-1){} condition and try to remove the item again, when the item does not exist anymore and should not have passed that condition in the first place, because the same procedure removed the item earlier.

procedure b() is this: <lsl>removeinv(string name) {

   if(llGetInventoryType(name)!=-1){
       llOwnerSay(name+" has an inventory type, therefore it exists. killing it with fire");
       llRemoveInventory(name);
       llOwnerSay(name+" should be dead by now);
   }

}</lsl>

but that may depend on how rapidly and under what conditions b() is triggered. (maybe when its triggered twice within CHANGED_INVENTORY matters) whatever, it seems to fail too often to check if the item exists before deleting it. It may have been deleted by other means. —The preceding unsigned comment was added by Ollj Oh‎