OsGetInventoryName

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Exemple of osGetInventoryName, not of llGetInventoryName)
 
(9 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|delay=0
 
|delay=0
 
|function_syntax=string osGetInventoryName(key itemId)
 
|function_syntax=string osGetInventoryName(key itemId)
 +
|description=Returns a string that is the name of inventory item
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
...
+
//
 +
// osGetInventoryName Script Exemple
 +
// Author: djphil
 +
//
 +
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch me to see osGetInventoryName usage.");
 +
    }
 +
 +
    touch_start(integer number)
 +
    {
 +
        key ItemKey = osGetInventoryItemKey("MyItemName");
 +
 +
        if (ItemKey != NULL_KEY)
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "Item name is " + osGetInventoryName(ItemKey));
 +
        }
 +
 +
        else
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "The item key is a NULL_KEY, item not found or owner has no rights ...");
 +
        }
 +
    }
 +
}
 
</source>
 
</source>
|description=Returns a string that is the name of inventory item
+
|additional_info=This function was added in 0.9.1.0 Dev
|additional_info=This function was added in 0.9.0.1 Dev
+
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
}}
 
}}
 +
== See Also ==
 +
* [[osGetInventoryName]]
 +
* [[osGetInventoryDesc]]
 +
* [[osGetInventoryItemKey]]
 +
* [[osGetInventoryLastOwner]]
 +
* [[osGetLastChangedEventKey]]

Latest revision as of 15:30, 7 December 2020

string osGetInventoryName(key itemId)
Returns a string that is the name of inventory item
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osGetInventoryName Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch me to see osGetInventoryName usage.");
    }
 
    touch_start(integer number)
    {
        key ItemKey = osGetInventoryItemKey("MyItemName");
 
        if (ItemKey != NULL_KEY)
        {
            llSay(PUBLIC_CHANNEL, "Item name is " + osGetInventoryName(ItemKey));
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "The item key is a NULL_KEY, item not found or owner has no rights ...");
        }
    }
}
Notes
This function was added in 0.9.1.0 Dev

Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34


[edit] See Also

Personal tools
General
About This Wiki