Don't click here unless you want to be banned.

LSL Wiki : llGetInventoryNumber

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl809.us.archive.org
integer llGetInventoryNumber(integer type);

Get the total number of items of type in the prim's inventory.

Use the following constants to specify type:
INVENTORY_ALL -1 Look at all inventory items
INVENTORY_TEXTURE 0 Only look at textures 0x00
INVENTORY_SOUND 1 Only look at sounds 0x01
INVENTORY_LANDMARK 3 Only look at landmarks 0x03
INVENTORY_CLOTHING 5 Only look at clothing 0x05
INVENTORY_OBJECT 6 Only look at objects 0x06
INVENTORY_NOTECARD 7 Only look at notecards 0x07
INVENTORY_SCRIPT 10 Only look at scripts 0x0A
INVENTORY_BODYPART 13 Only look at body parts 0x0D
INVENTORY_ANIMATION 20 Only look at animations 0x14
INVENTORY_GESTURE 21 Only look at gestures 0x15

Note: Inventory constants are not bitflags and thus should not be used with Bitwise operators.

Example:
llSay(0, "I contain " + (string)llGetInventoryNumber(INVENTORY_OBJECT) + " objects.");

Compare with llGetInventoryKey and llGetInventoryName.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions / Inventory
Comments [Hide comments/form]
My tests have shown that this function returns the number of items in the prim from which it is executed, and *not* the total number of items in the object (including child prims). Can anyone confirm this?
-- ArbusFahid (2005-11-01 15:09:20)
Yes - that's by design. When executed from a script in a prim's inventory, it looks only at that prim's inventory.
-- ChristopherOmega (2005-11-01 18:12:22)
Attach a comment to this page: