Difference between revisions of "Template:LSL Function/notecard"
Jump to navigation
Jump to search
(Move some Caveats from LlGetNotecardLine) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{LSL_Function/inventory|{{{1|name}}}|uuid={{{uuid|}}}|type=notecard}}{{#if: | {{LSL Injection Test}}{{LSL_Function/inventory|{{{1|name}}}|uuid={{{uuid|}}}|type=notecard}}{{#if: | ||
{{#vardefine:caveats|{{#var:caveats}} | {{#vardefine:caveats|{{#var:caveats}} | ||
* If | * If {{LSLP|{{{1|name}}}}} is a new empty notecard (never saved) then an error "Couldn't find notecard ~NAME~" (~NAME~ being the value of {{LSLP|{{{1|name}}}}}) will be shouted on the [[DEBUG_CHANNEL]]. This is because until a notecard is saved for the first time, it does not exist as an asset only as an inventory placeholder. | ||
** If the notecard is {{LSLGC|Permissions/Asset|full-perms}} you can check for this with [[llGetInventoryKey]] which will return [[NULL_KEY]] in this case. However if notecard is not {{LSLGC|Permissions/Asset|full-perms}}, there is no way to avoid the error message. | |||
}} | }} | ||
}}<noinclude> | }}<noinclude> | ||
{{Box|Caveats|2={{#var:caveats}}}} | {{Box|Caveats|2={{#var:caveats}}}} | ||
</noinclude> | </noinclude> |
Latest revision as of 09:49, 3 May 2014
Caveats
- If name is missing from the prim's inventory or it is not a notecard then an error is shouted on DEBUG_CHANNEL.
- If name is a new empty notecard (never saved) then an error "Couldn't find notecard ~NAME~" (~NAME~ being the value of name) will be shouted on the DEBUG_CHANNEL. This is because until a notecard is saved for the first time, it does not exist as an asset only as an inventory placeholder.
- If the notecard is full-perms you can check for this with llGetInventoryKey which will return NULL_KEY in this case. However if notecard is not full-perms, there is no way to avoid the error message.