OsGetInventoryName

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add exemple)
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">
...
+
//
 +
// llGetInventoryName Script Exemple
 +
//
 +
 
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        if (llGetInventoryNumber(INVENTORY_LANDMARK))
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "Touch to see llGetInventoryName usage.");
 +
        }
 +
 
 +
        else
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "Inventory landmark missing ...");
 +
        }
 +
    }
 +
 
 +
    touch_start(integer number)
 +
    {
 +
        string inventory_name = llGetInventoryName(INVENTORY_LANDMARK, 0);
 +
        string inventory_desc = osGetInventoryDesc(inventory_name);
 +
        llSay(PUBLIC_CHANNEL, "inventory_name: " + inventory_name);
 +
        llSay(PUBLIC_CHANNEL, "inventory_desc: " + inventory_desc);
 +
    }
 +
}
 
</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.1.0 Dev
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
}}
 
}}

Revision as of 03:56, 30 November 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)
//
// llGetInventoryName Script Exemple
//
 
default
{
    state_entry()
    {
        if (llGetInventoryNumber(INVENTORY_LANDMARK))
        {
            llSay(PUBLIC_CHANNEL, "Touch to see llGetInventoryName usage.");
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "Inventory landmark missing ...");
        }
    }
 
    touch_start(integer number)
    {
        string inventory_name = llGetInventoryName(INVENTORY_LANDMARK, 0);
        string inventory_desc = osGetInventoryDesc(inventory_name);
        llSay(PUBLIC_CHANNEL, "inventory_name: " + inventory_name);
        llSay(PUBLIC_CHANNEL, "inventory_desc: " + inventory_desc);
    }
}
Notes
This function was added in 0.9.1.0 Dev

Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34


Personal tools
General
About This Wiki