Difference between revisions of "LlGetInventoryCreator"

From Second Life Wiki
Jump to: navigation, search
m (Multi-lang)
m
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Multi-lang}}{{LSL_Function/inventory|item|uuid=false}}
 
 
{{LSL_Function
 
{{LSL_Function
 +
|inject-2={{LSL_Function/inventory|item|uuid=false}}
 
|func_id=291|func_sleep=0.0|func_energy=10.0
 
|func_id=291|func_sleep=0.0|func_energy=10.0
 
|func=llGetInventoryCreator|return_type=key|p1_type=string|p1_name=item
 
|func=llGetInventoryCreator|return_type=key|p1_type=string|p1_name=item
 +
|sort=GetInventoryCreator
 
|func_footnote
 
|func_footnote
 
|func_desc
 
|func_desc
|return_text=of the creator of the inventory '''item'''.
+
|return_text=of the creator of the inventory {{LSLP|item}}.
 
|spec
 
|spec
|caveats
+
|caveats=
 +
* If {{LSLP|item}} has multiple creators, then this function will return [[NULL_KEY]]. (e.g. if an object created by Lex contained a script created by Strife). See {{Jira|SVC-6985}} and {{Jira|SVC-6820}} for more information.
 
|constants
 
|constants
|examples
+
|examples=Add an object to a prims inventory, as well as this script, in order to get the name of the creator.
 +
<source lang="lsl2">default{
 +
    state_entry(){
 +
        llRequestAgentData(llGetInventoryCreator(llGetInventoryName( INVENTORY_OBJECT, 0)),DATA_NAME);
 +
    }
 +
   
 +
    dataserver(key qid, string data){
 +
        llOwnerSay(data);
 +
    }
 +
}</source>
 
|helpers
 
|helpers
 
|also_functions=
 
|also_functions=
{{LSL DefineRow||[[llGetCreator]]|}}
+
{{LSL DefineRow||[[llGetInventoryName]]|Returns the inventory item's name}}
{{LSL DefineRow||[[llGetInventoryKey]]|}}
+
{{LSL DefineRow||[[llGetInventoryType]]|Tests to see if an inventory item exists and returns its type}}
{{LSL DefineRow||[[llGetInventoryType]]|}}
+
{{LSL DefineRow||[[llGetInventoryNumber]]|Returns the number of items of a specific type in inventory}}
{{LSL DefineRow||[[llGetInventoryPermMask]]|}}
+
{{LSL DefineRow||[[llGetInventoryPermMask]]|Returns the inventory item's permissions}}
 +
{{LSL DefineRow||[[llGetInventoryKey]]|Returns the inventory item's [[UUID]] (if full perm)}}
 
|also_events
 
|also_events
 
|also_tests
 
|also_tests

Latest revision as of 01:57, 22 January 2015

Summary

Function: key llGetInventoryCreator( string item );

Returns a key of the creator 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 multiple creators, then this function will return NULL_KEY. (e.g. if an object created by Lex contained a script created by Strife). See SVC-6985 and SVC-6820 for more information.
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{
    state_entry(){
        llRequestAgentData(llGetInventoryCreator(llGetInventoryName( INVENTORY_OBJECT, 0)),DATA_NAME);
    }
 
    dataserver(key qid, string data){
        llOwnerSay(data);
    }
}

See Also

Functions

•  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 key llGetInventoryCreator( string item );