Here's the scenario:
- a container with caninsert-, oninsert- and methodscript
- an item which is dragged into the container
- during the process, the item is supposed to be destroyed
CanInsertScript checks for objtype and returns 1 (valid).
OnInsertScript contains container.MethodCall(item), which looks like this:
Code: Select all
exported function MethodCall( container, inserted_item )
// Make sure no-one else is using this.
var result := ReserveItem(inserted_item);
if (result)
// Destroy it.
result := DestroyItem(inserted_item);
endif
return result;
endfunction
I did few tests and it seems that ReserveItem is the cause of the error. Should the methodscript not to reserve the item before trying to destroy it, item is destroyed properly.
Yet I have not tried if same applies in some other settings, too, but I hope the error message itself reveals something to the ones who have access to the source code (and few minutes time to check it out).
I don't think that in this case the item's destruction should fail.