Difference between revisions of "Template:LSL Function/give"

From Second Life Wiki
Jump to navigation Jump to search
(New page: <includeonly>{{#if: {{#vardefine:target-type|~{{#expr:{{#if:{{{avatar|}}}|1|0}}+{{#if:{{{prim|}}}{{{object|}}}|2|0}}}}}} {{#vardefine:caveats|{{#var:caveats}} * If '''{{LSL Param|{{{1}}}...)
 
m
Line 3: Line 3:
{{#vardefine:target-type|~{{#expr:{{#if:{{{avatar|}}}|1|0}}+{{#if:{{{prim|}}}{{{object|}}}|2|0}}}}}}
{{#vardefine:target-type|~{{#expr:{{#if:{{{avatar|}}}|1|0}}+{{#if:{{{prim|}}}{{{object|}}}|2|0}}}}}}


{{#vardefine:caveats|{{#var:caveats}}
{{#vardefine:pcaveats|{{#var:caveats}}}}
* If '''{{LSL Param|{{{1}}}}}''' is {{#switch:{{#var:target-type}}|~1=not the owner|~2=not owned by the same person|is not the owner nor shares the same owned}} and '''{{LSL Param|{{{2}}}}}''' cannot be transfered an error is shouted on {{LSL Const|DEBUG_CHANNEL|integer|hex=0x7FFFFFFF}}.
{{#vardefine:caveats}}
* If '''{{LSL Param|{{{2}}}}}''' cannot be copied then an error is shouted on {{LSL Const|DEBUG_CHANNEL|integer|hex=0x7FFFFFFF}}.
}}


{{LSL Function/{{#switch:{{#var:target-type}}|~1=avatar|~2=prim|uuid}}|object={{{object|}}}|sim={{{sim|}}}|{{{1|}}}|}}
{{LSL Function/{{#switch:{{#var:target-type}}|~1=avatar|~2=prim|uuid}}|object={{{object|}}}|sim={{{sim|}}}|{{{1|}}}|}}


{{LSL Function/inventory|{{{2|}}}|type={{{type|}}}|uuid={{{uuid|}}}|full={{{full|}}}}}
{{LSL Function/inventory|{{{2|}}}|type={{{type|}}}|uuid={{{uuid|}}}|full={{{full|}}}}}
{{#vardefine:caveats|{{#var:pcaveats}}
* If '''{{LSL Param|{{{1}}}}}''' is {{#switch:{{#var:target-type}}|~1=not the owner|~2=not owned by the same person|is not the owner nor shares the same owned}} and '''{{LSL Param|{{{2}}}}}''' cannot be transfered an error is shouted on {{LSL Const|DEBUG_CHANNEL|integer|hex=0x7FFFFFFF}}.
* If '''{{LSL Param|{{{2}}}}}''' cannot be copied then an error is shouted on {{LSL Const|DEBUG_CHANNEL|integer|hex=0x7FFFFFFF}}.
{{#var:caveats}}}}
{{#vardefine:pcaveats}}


}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{Multi-lang}}
{{UpdateLink}}


{| {{Prettytable}} {{#vardefine:caveats}}
{| {{Prettytable}} {{#vardefine:caveats}}
|+<code><nowiki>{{</nowiki>{{FULLPAGENAMEE}}<nowiki>|ta|type=sound|uuid=true}}</nowiki></code>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=true}}
|+<code><nowiki>{{</nowiki>{{FULLPAGENAMEE}}<nowiki>|target|item|type=sound|uuid=true}}</nowiki></code>{{{{FULLPAGENAMEE}}|target|item|type=sound|uuid=true}}
|-{{Hl2}}
|-{{Hl2}}
! #var
! #var
Line 22: Line 29:
{{VarPair|caveats}}
{{VarPair|caveats}}
|-
|-
{{VarPair|p_ta_desc}}
{{VarPair|p_target_desc}}
|-
|-
{{VarPair|p_ta_hover}}
{{VarPair|p_target_hover}}
|-
{{VarPair|p_item_desc}}
|-
{{VarPair|p_item_hover}}
|}
|}


{| {{Prettytable}} {{#vardefine:caveats}}
{| {{Prettytable}} {{#vardefine:caveats}}
|+<code><nowiki>{{</nowiki>{{FULLPAGENAMEE}}<nowiki>|ta|type=sound|uuid=false}}</nowiki></code>{{{{FULLPAGENAMEE}}|ta|type=sound|uuid=false}}
|+<code><nowiki>{{</nowiki>{{FULLPAGENAMEE}}<nowiki>|target|item|type=sound|uuid=false}}</nowiki></code>{{{{FULLPAGENAMEE}}|target|item|type=sound|uuid=false}}
|-{{Hl2}}
|-{{Hl2}}
! #var
! #var
Line 35: Line 46:
{{VarPair|caveats}}
{{VarPair|caveats}}
|-
|-
{{VarPair|p_ta_desc}}
{{VarPair|p_target_desc}}
|-
{{VarPair|p_target_hover}}
|-
{{VarPair|p_item_desc}}
|-
|-
{{VarPair|p_ta_hover}}
{{VarPair|p_item_hover}}
|}
|}
</noinclude>
</noinclude>

Revision as of 05:46, 13 May 2009

Press this link after making a change, so it becomes displayed.
{{Template:LSL_Function/give|target|item|type=sound|uuid=true}}
#var value
caveats
  • If target is is not the owner nor shares the same owned and item cannot be transfered an error is shouted on DEBUG_CHANNEL.
  • If item cannot be copied then an error is shouted on DEBUG_CHANNEL.
  • If item is missing from the prim's inventory and it is not a UUID or it is not a sound then an error is shouted on DEBUG_CHANNEL.
  • If item is a UUID then there are no new asset permissions consequences for the object.
    • The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.
p_target_desc group, avatar or prim UUID
p_target_hover group, avatar or prim UUID
p_item_desc a sound in the inventory of the prim this script is in or a UUID of a sound
p_item_hover a sound in the inventory of the prim this script is in or a UUID of a sound
{{Template:LSL_Function/give|target|item|type=sound|uuid=false}}
#var value
caveats
  • If target is is not the owner nor shares the same owned and item cannot be transfered an error is shouted on DEBUG_CHANNEL.
  • If item cannot be copied then an error is shouted on DEBUG_CHANNEL.
  • If item is missing from the prim's inventory or it is not a sound then an error is shouted on DEBUG_CHANNEL.
p_target_desc group, avatar or prim UUID
p_target_hover group, avatar or prim UUID
p_item_desc a sound in the inventory of the prim this script is ina sound in the inventory of the prim this script is in or a UUID of a sound
p_item_hover a sound in the inventory of the prim this script is ina sound in the inventory of the prim this script is in or a UUID of a sound