Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

I cannot get a vector from a list

Spidey Cela
Registered User
Join date: 26 Oct 2005
Posts: 5
12-20-2005 04:53
I have a list of vectors, but when I use llList2Vector I get <0,0,0>

I know I have a valid vector because I see it if I do llList2String

The following shows what happens:

llSay(0,llList2String(lstVector,intIndex));
llSay(0,(string)llList2Vector(lstVector,intIndex));

this returns

Object: <4,234,101>
Object: <0.00000, 0.00000, 0.00000>


What am I doing wrong with my llList2Vector command?

A big thanks to anyone who helps.
Jokey Domela
Registered User
Join date: 27 Jul 2005
Posts: 83
12-20-2005 05:27
Which way did you create your list?


list lstVector=["<1,2,3>","<4,5,6>"]

or

list lstVector=[<1,2,3>,<4,5,6>]

should be option 2. Bet you did # 1
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
12-20-2005 06:06
If it was the former, ["<1,1,1>"], it is an known issue. You can get around by doing:

vector foo = (vector)llList2String(lstVector,intIndex);
Spidey Cela
Registered User
Join date: 26 Oct 2005
Posts: 5
12-20-2005 17:09
From: Alondria LeFay
You can get around by doing: vector foo = (vector)llList2String(lstVector,intIndex);


Thank you very much. I am reading the vectors from a notecard, so I suppose I was doing option 1. Typecasting to vector cured the problem.
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
12-20-2005 22:56
llList2Vector(), llList2Rot() are busted. Just force type and use ([type])llList2String().

This stuff has been busted for a while. If you want to stay safe only use llList2String(), llList2Integer() and llList2Float().
_____________________