OsGetInventoryItemKey

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 14: Line 14:
 
     touch_start(integer n)
 
     touch_start(integer n)
 
     {
 
     {
         key uuid = llGetInventoryKey("MyNoteCard");
+
         key uuid = osGetInventoryItemKey("MyNoteCard");
 
         llOwnerSay("osGetInventoryDesc(uuid) is " + osGetInventoryDesc(uuid));
 
         llOwnerSay("osGetInventoryDesc(uuid) is " + osGetInventoryDesc(uuid));
 
     }
 
     }

Revision as of 14:54, 16 August 2019

key osGetInventoryItemKey(string name)
Returns id(key) of a inventory item within the prim inventory.
If name is not unique result maybe unpredictable.
Note that unlike this function, llGetInventoryKey does not return the item ID but the ID of its asset.
Threat Level This function does not do a threat level check
Permissions Script owner needs modify rights
Extra Delay 0 seconds
Example(s)
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch me to show osGetInventoryDesc");
    }
 
    touch_start(integer n)
    {
        key uuid = osGetInventoryItemKey("MyNoteCard");
        llOwnerSay("osGetInventoryDesc(uuid) is " + osGetInventoryDesc(uuid));
    }
}
Notes
This function was added in 0.9.1.0 Dev

Implemented August, 16 2019


Personal tools
General
About This Wiki