Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGiveInventory problems with some names of object

sparti Carroll
Script developer
Join date: 23 Feb 2006
Posts: 30
04-23-2006 02:42
Hi all ;-)

I have a sales machine thing which doles out objects when paid.


I've been over and over this with various trace enabled and have come to the conclusion that:
llGiveInventory with an item named "Sphere Builder" fails, every time ;-)
Whereas if I simply rename the item to "Sphere Builder COPYMOD" then it works every time.

I'm 99.9% certain that it's not permissions, because I'm not doing anything except rename the object to be given inside the sales machine. So I'm not copying in a new object for example.


It fails on 2 copies of the sales machine in the same way... so I'm pretty sure it's not a corrupted sales machine (but how? anyway?).



Well my workaround is just to use the name that works!
But WHY oh Why (oh why?)... and will this be fixed !!!
It's just so... random!


Listening Lindens - this means you...



sparti
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-23-2006 04:10
Best guess... you've not got the name quite right. "Sphere Builder " with a space is different to "Sphere Builder" without.

It's a major PITA and hard to catch.

You can run checks on the name, hard coded or otherwise with llGetInventoryPermMask() which will give you a variety of fun ways to check the perms, but will also shout out if it can't find the object it's trying to check.
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
04-23-2006 06:38
Hmm, I like to do this check to catch spelling errors:
CODE
if (llGetInventoryType(item_name) != INVENTORY_OBJECT) {
llInstantMessage(llGetOwner(), "inventory bug on " + item_name);
}

But I think I'll start using llGetInventoryPermMask when a permissions check would be helpful as well. Thanks Eloise. :)
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
04-23-2006 08:59
It's possible that this is part of the voodoo that LL does. The sims are a patchwork of software, tied together with scripts. Some sims get modified scripts. Jump back 2 years, i was growing links beyond the link distance to as large as 8km (i may have gone larger i don't remember, the technical limit was 2^24). Then i would break these huge links, and have the prims email back the base prim as to where they were. A primitive mapping system (no pun intendid). After a few days of this in a single sim, my links started breaking at 256m; apparently my little system was putting a bit of stress on the system, to which LL's responce was to in that sim, put an extra check on link distances so they don't go beyond the sim. Anyway the moral of the story is that LL has the capability to track down miscreants and put into place creative solutions.

It would not supprise me at all if LL nerfed the inventory name "Sphere Builder" as to keep down lag, since sphere builder causes quite a bit in rezzing all those bits.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
sparti Carroll
Script developer
Join date: 23 Feb 2006
Posts: 30
Hey thanks for the replies !
04-24-2006 00:07
I have tried so many times and in so many places I'm certain it's not me gettting the name wrong! I'm aware of the hazards of spaces missing or inserted in hard to see places so my trace has [] around the name.
sparti Carroll
Script developer
Join date: 23 Feb 2006
Posts: 30
Adhoc squishing of names
04-24-2006 00:08
I like the idea that names get squished ... the bits of sphere builder are all called 'Block' however ;-)
Sky Honey
Coder
Join date: 16 May 2005
Posts: 105
04-24-2006 07:22
From: Strife Onizuka
It would not supprise me at all if LL nerfed the inventory name "Sphere Builder" as to keep down lag, since sphere builder causes quite a bit in rezzing all those bits.

This script worked for me:
CODE
default {
touch_start(integer total_number) {
llGiveInventory(llGetOwner(), "Sphere Builder");
}
}

So there must be more to it. Can you post your script, Sparti?
_____________________
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
04-24-2006 13:29
It's not something LL is doing on purpose. It's not a bug in the vendor script. It is a bug that was introduced with SL v1.9. I've run into this multiple times with different items I have for sale, where the vendor simply will not give certain items and the only fix is renaming. The first time I ran across the bug shows just how messed up it is.

Just after 1.9 came out, in my main store my HUD vendor would not sell a box named "HUD Radar v1.0c box". I could buy it and receive the item, but anyone else, including my alt, would pay but not get it. The money event does fire and the script runs fine (my own vendor which is also for sale), just silently fails the llGiveInventory() command. Other items in the vendor worked. However, a copy of the same vendor that was in a different sim worked fine, and gives the same item without a problem. I tried making a new vendor from brand new prims, repackaged the item in a new box with the same name, but nothing worked. I renamed the box to "HUD Radar v1.0d box", but it didn't work, so I tried "DT HUD Radar v1.0c box", which worked fine.

I've run into this with about a dozen different items, including things made entirely after SL v1.9. I can always get it, and have to use an alt to see if it works. The only fix is to rename the item and have someone else or an alt test buying it.
_____________________
Gigs Taggart
The Invisible Hand
Join date: 12 Feb 2006
Posts: 406
04-25-2006 09:48
Yes, I've seen the same problem.

My vendor would not give out certain notecards no matter what I did, until I pulled them out, copied their contents, put them back in as new notecards.

And no, there was no spaces at the ends of the names or anything like that. I renamed them several times to make sure of that. Also the vendor didn't complain that it couldn't find them, it did see them named correctly in inventory, it just couldn't give them correctly.