Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetInventoryName issues

Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
05-11-2009 10:23
Ok, so I'm trying to simply display the name of one object within a prims inventory in the floating text.

I've tried the obvious in my script:

From: someone
integer = nam;

nam = (integer)llGetInventoryName(INVENTORY_OBJECT);

llSetText("get a free item"+(string)nam,<0,1,0>,1);


It's not working for me at all, am i missing something? :(

Any suggestions would be appreciated...
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
05-11-2009 11:10
string llGetInventoryName(integer type, integer number)

llGetInventoryName returns a string and requires an index.

e.g. llSetText("Get a free item " + llGetInventoryName(INVENTORY_OBJECT, 0), <0,1,0>, 1);
_____________________
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
05-11-2009 11:30
Thanks a bunch, worked like a charm :) ... sometimes it's the simple things that blow ones mind at times lol