|
Auron Reardon
Registered User
Join date: 30 Jun 2006
Posts: 41
|
10-15-2006 20:40
I am trouble shooting a vendor script that someone else wrote. It assembles a list of the inventory of the object the script is in, then removes the script itself from the list, then passes the list to llGiveInventoryList. Appearently, every so often, buyers begin receiving empty folders until the script is reset. When this happens, everything else in the script still works: the money exchange, the name of the folder, the confirmation dialogs, etc. I made a number of test purchases using the script, but have not been able to re-create the problem because the seller can't pinpoint any condition that triggers it. It appears to be random. But I trust that the problem exists because the seller does large volumes and the script has been in use for 2 years. The crux of the code is listed below. He checks for the count of items on the list right before passing to llGiveInventoryList. Of course, that doesn't mean that the items are valid name strings - I guess maybe I could check for that. But, anyway, I was just wondering if there is any known flakiness with llGiveInventoryList or if anyone has seen this problem before. i = llListFindList(inventory, [llGetScriptName()]); inventory = llDeleteSubList(inventory, i, i); if (llGetListLength(inventory) < 1) llSay(0, "No items to offer."); else { llSetText("", <0, 0, 0>, 0.0); llGiveInventoryList(id, text, inventory); }
|
|
Auron Reardon
Registered User
Join date: 30 Jun 2006
Posts: 41
|
10-15-2006 20:46
In case it helps, here is the loop where the inventory list is built. for (i = 0; i < num; ++i) { name = llGetInventoryName(INVENTORY_ALL, i); if(llGetInventoryPermMask(name, MASK_OWNER) & PERM_COPY) { inventory += name; } llSetText(text + (string)((integer)(((i + 1.0) / num) * 100))+ "%", <1, 1, 1>, 1.0); }
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
10-15-2006 22:43
If this is a networked vendor the following may apply (from the Wiki):
llGiveInventoryList does not consistently deliver the objects to an agent in another sim. From test results, it appears it will deliver only if the agent is a child agent to the sim with the giver or if the agent has been recently in the sim that the giver is. Do not rely on this functionality!
|
|
Auron Reardon
Registered User
Join date: 30 Jun 2006
Posts: 41
|
10-16-2006 04:12
Thanks, squirrel, I should have read the wiki more thoroughly. I'll bet that has something to do with it. Now I have something I can actually test.
|