llGetInventoryDesc

From Second Life Wiki
Revision as of 13:01, 9 December 2023 by Lucia Nightfire (talk | contribs) (This function returns a string, not a key.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Function: string llGetInventoryDesc( string item );

Returns a string with the description of the inventory item.

• string item an item in the inventory of the prim this script is in

Caveats

  • If item is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.
  • If item has no description an empty string is returned.
All Issues ~ Search JIRA for related Bugs

Examples

Add an object to a prims inventory, as well as this script, in order to get the name of the creator.

default
{
    touch_start(integer total_number)
    {
        integer count = llGetInventoryNumber(INVENTORY_ALL);
        integer index;
        for (index = 0; index < count; ++index)
        {
            string name = llGetInventoryName(INVENTORY_ALL, index);
            string desc = llGetInventoryDesc(name);
            
            llSay(0, "Item: \"" + name + "\" -- \"" + desc + "\"");
        }
    }
}

See Also

Functions

•  llGetInventoryAcquireTime Returns the time the item was added to the prim's inventory
•  llGetInventoryName Returns the inventory item's name
•  llGetInventoryType Tests to see if an inventory item exists and returns its type
•  llGetInventoryNumber Returns the number of items of a specific type in inventory
•  llGetInventoryPermMask Returns the inventory item's permissions
•  llGetInventoryKey Returns the inventory item's UUID (if full perm)

Deep Notes

Search JIRA for related Issues

Signature

function string llGetInventoryDesc( string item );