LlList2Key
Looking for the current API? Open the llList2Key reference →
Function notes
Return value notes
Examples
// Best viewed in Chat History (ctrl-h)
default
{
state_entry()
{
list my_list = ["a", 1, 2.0, <1,2,3>, <1,2,3,4>, llGetOwner()];
integer i;
for (i=0;i<llGetListLength(my_list); ++i)
{
llOwnerSay("string=" + llList2String(my_list,i)
+ "\n integer=" + (string)llList2Integer(my_list,i)
+ "\n float=" + (string)llList2Float(my_list,i)
+ "\n vector=" + (string)llList2Vector(my_list,i)
+ "\n rot=" + (string)llList2Rot(my_list,i)
+ "\n key=" + (string)llList2Key(my_list,i) );
}
}
}See also: functions
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
<span title="{{{2}}}" style="border-bottom:1px dotted; cursor:help;">{{#if:{{{3|}}}|{{{3|}}}|{{{1}}}}}</span>Template:LSL Function/list/element
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{LSL_Function/negative index|true|{{{2|none_}}}}}{{#if:
{{#vardefine:p_{{{1|none}}}_desc|List containing the element of interest.}}
{{#vardefine:p_{{{2|none_}}}_desc|Index of the element of interest.}}
{{#vardefine:header_footnote|{{#if:{{{return|}}}|{{#if:{{#var:header_footnote}}|{{#var:header_footnote}}<br/>}}
If {{LSLP|{{{2|none}}}}} describes a location not in {{LSLP|{{{1|none}}}}} then {{{return|}}} is returned.{{#if:{{{3|}}}|<br/>
{{#if:{{{nc|}}}
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] then {{{return|}}} is returned. <br/>
Here is a workaround: <code>([[{{{3|}}}{{#var:lang}}|{{{3|}}}]])[[llList2String{{#var:lang}}|llList2String]]({{LSL Param|{{{1|none}}}}}, {{LSL Param|{{{2|none}}}}});</code>
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] it is [[typecast]] to a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]]. {{#if:{{{nf|}}}||If it cannot be typecast {{{return|}}} is returned.}}}}}}|{{#var:header_footnote}}}}}}
}}<includeonly>{{LSLC|List/Read Element{{#var:lang}}}}</includeonly><noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none_}}}_desc}}
|-
{{VarPair|header_footnote}}
|-
{{VarPair|spec}}
|-
{{VarPair|constants_nb}}
|-
{{VarPairTable|also_articles}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.