LSL Wiki Mirror 10-5-2006: llList2Vector

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
vector llList2Vector(list src, integer index)

Copy and return the vector at index in the list src.

Compare with llList2Float, llList2Integer, llList2Key, llList2List, llList2ListStrided, llList2Rot and llList2String.

Example:
llList2Vector(foo, 0); // returns the first element in the list.
llList2Vector(foo, 1); // returns the second element in the list.

Note: llList2Vector will not automatically cast a string to a vector. Thus, if you attempt to retrieve a list element consisting of a vector cast to a string like "<1,2,4>", llList2Vector will return ZERO_VECTOR or <0,0,0>. This can be avoided by using llList2String and casting directly, as in:
vector foo = (vector)llList2String(["<1,2,4>"], 0);


Functions | Lists
There are 3 comments on this page. [Display comments/form]