OsGetInventoryDesc
From OpenSimulator
(Difference between revisions)
(Created page with "{{osslfunc |threat_level=None |function_syntax=string osGetInventoryDesc(string name) |ossl_example=<source lang="lsl"> default { state_entry() { string name= llGetI...") |
m (Change See Also) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
− | |threat_level= | + | |threat_level=ignored |
− | |function_syntax=string osGetInventoryDesc(string | + | |permissions=true |
+ | |delay=0 | ||
+ | |function_syntax=string osGetInventoryDesc(string itemName_or_itemId) | ||
+ | |description=Returns a string that is the description of inventory item with id "itemName_or_itemId" if that parameter is a valid key or with that name if not. | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | + | // | |
− | + | // osGetInventoryDesc Script Exemple | |
− | + | // Author: Gudule Lapointe | |
− | + | // | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | default | |
− | + | { | |
+ | state_entry() | ||
+ | { | ||
+ | if (llGetInventoryNumber(INVENTORY_LANDMARK)) | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to see osGetInventoryDesc 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> | ||
+ | |additional_info=This function was added in 0.7.4-post-fixes | ||
+ | Implemented March, 17 2012, id argument added February, 22 2019 | ||
}} | }} | ||
+ | == See Also == | ||
+ | * [[osGetInventoryName]] | ||
+ | * [[osGetInventoryDesc]] | ||
+ | * [[osGetInventoryItemKey]] | ||
+ | * [[osGetInventoryLastOwner]] | ||
+ | * [[osGetLastChangedEventKey]] |
Latest revision as of 18:58, 5 December 2020
string osGetInventoryDesc(string itemName_or_itemId)
| |
Returns a string that is the description of inventory item with id "itemName_or_itemId" if that parameter is a valid key or with that name if not. | |
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) | |
// // osGetInventoryDesc Script Exemple // Author: Gudule Lapointe // default { state_entry() { if (llGetInventoryNumber(INVENTORY_LANDMARK)) { llSay(PUBLIC_CHANNEL, "Touch to see osGetInventoryDesc 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.7.4-post-fixes
Implemented March, 17 2012, id argument added February, 22 2019 |
[edit] See Also
- osGetInventoryName
- osGetInventoryDesc
- osGetInventoryItemKey
- osGetInventoryLastOwner
- osGetLastChangedEventKey