Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Inventory Names returning empty

Ben Hoark
Registered User
Join date: 16 Jan 2007
Posts: 6
03-09-2008 09:37
I am using the following function to list the textures in a prim's inventory. For some reason, llGetInventoryName is returning an empty string for some textures.

listTextures()
{
integer max = llGetInventoryNumber(INVENTORY_TEXTURE);
integer i = 0;
for (i = 0; i < max; i++)
{
llOwnerSay((string)i + ":" + llGetInventoryName(i, INVENTORY_TEXTURE));
}
}

Any advice?

(And how do I include code properly in this forum?)
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
03-09-2008 09:40
From: Ben Hoark

llOwnerSay((string)i + ":" + llGetInventoryName(i, INVENTORY_TEXTURE));

Your type and number arguments are backwards in llGetInventoryName.

There's no real way to show code here. Some people have GreaseMonkey scripts to view it, so at least put it in
CODE
 or 
CODE
 tags.
_____________________
Ben Hoark
Registered User
Join date: 16 Jan 2007
Posts: 6
03-09-2008 09:43
From: Tyken Hightower
Your type and number arguments are backwards in llGetInventoryName.

D'oh!

Thanks.