Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Notecard reading and Vectors....

Azzura Supplee
Safety Girl
Join date: 16 Jun 2006
Posts: 29
06-23-2007 11:46
I have my script read a notecard:

SmokeTime=15
Offtime=4
StartColor=<0,1,1>
EndColor=<1,1,0>


dataserver(key queryId, string data)
{
if(queryId == gQueryId)
{
if(data != EOF)
{
list tmp = llParseString2List(data, ["="], []);
string setting = llList2String(tmp,0);
if (setting == "SmokeTime";)
{
lTime = llList2Integer(tmp,1);
}
if (setting == "Offtime";)
{
delay = llList2Integer(tmp,1);
}
if (setting == "StartColor";)
{
sColor = llList2Vector(tmp,1);
}
if (setting == "EndColor";)
{
eColor = llList2Vector(tmp,1);
}
gQueryId = llGetNotecardLine(gNotecardName,++gNotecardLine);

The vectors are used for the Particle Sys -- but when it starts - the particles are black

When I do the eColor = llList2Vector(tmp,1); is it losing some data somehow?

Bugtesting and using eColor as a String - it shows the full vector.

Anyone that can point me in the right direction? Thanks
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
06-23-2007 12:01
The easiest workaround is to use (vector)llList2String(tmp,1)

Also use this kind of format when parsing vector data passed in emails or chat, whenever a vector has been converted to a string.
_____________________