Hello scriptors
I have a prim with an 'allow inventory drop' script I wrote inside. When someone drops the correct object inside, the script executes a specific order.
My problem is that if someone drops in multiple items at once, it is possible to cause a crash and confuse the script so it no longer is able to locate the specific dropped item it is looking for.
I thought a solution would be to run a timer event that every so often checks to see if it has items in the inventory besides the working script and deletes all of them. So if someone drops a lot of objects and clothes and notecards, etc inside the prim it will clean them up and ready itself for the next visitor who will hopefully not jerk around with the object and place only the asked for item inside.
My problem is my scripting skills I fear are not good enough to accomplish this, since I suspect it would involve getting a list of all of the items in the prim's inventory besides the script, and then deleting that list (called with a timer event). I've worked my way through the wiki and library but I fear both the ability to check all kinds of items and to make and delete lists is a bit above my skill level. Does anyone have a suggestion or can point me to a script that on a timer event checks its inventory and deletes everything inside except for the working scripts?
Any help welcome. Thanks!
-T