LlGiveInventory

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llGiveInventory( key destination, string inventory );
150 Function ID
0.0* Delay
10.0 Energy

Give inventory to destination.

• key destination avatar or prim UUID
• string inventory an item in the prim's inventory

If destination is an object then it must be in the same region.
If destination is an avatar they do not have to be in the same region.

Caveats

  • If destination is an avatar the script sleeps for 2.0 seconds. (Giving to objects or attachments has no delay)
  • If destination is is not the owner nor shares the same owner, and inventory cannot be transferred, an error is shouted on DEBUG_CHANNEL.
  • If inventory cannot be copied then an error is shouted on DEBUG_CHANNEL.
  • If destination is a prim that is not in the same region an error is shouted on DEBUG_CHANNEL.
  • If inventory is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.
  • There is no way to know if the transaction failed.
  • Scripts reach destination disabled (not running, and cannot be made to run unless the destination object is taken to inventory and rezzed again, or the script is recompiled). To send a running script to a prim use llSetRemoteScriptAccessPin.
  • If destination is locked then inventory cannot be transferred and a Blocked by permissions error is shouted on the DEBUG_CHANNEL.

Search JIRA for related Bugs

Examples

default
{
    touch_start(integer n)
    {
        //Gives this script to whoever touches the object.
        llGiveInventory(llDetectedKey(0), llGetScriptName());
    }
}

See Also

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages