|
Armandi Goodliffe
Fantasy Mechanic
Join date: 2 Jan 2006
Posts: 144
|
07-27-2006 15:12
So to show what my problem is, here is some code:
string listing = llList2CSV(GetPrimitiveParams([PRIM_TYPE]));
llSetPrimitiveParams(GetPrimitiveParams([PRIM_TYPE])); //Works just fine
llSetPrimitiveParams(llCSV2List(listing)); //ERROR: llSetPrimitiveParams error running rule #1: non-integer rule.
Now, no matter how I try and output this, the end result looks the same to me. I'm not sure what the difference is. oh, the method GetPrimitiveParams comes from the bottom of http://secondlife.com/badgeo/wakka.php?wakka=llGetPrimitiveParams rather then the default.
|
|
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
|
07-27-2006 15:35
When you convert a list to a string using llList2CVS you lose the variable types, these are very important to the llSetPrimitiveParam function. Instead use the function on the following page: http://secondlife.com/badgeo/wakka.php?wakka=ExampleListConversionWorks a treat, takes your list and checks each element of the list for it's type and sends that as a 'note', when converting back to a list it reads each 'note' and applies an (integer)llList2String or (float)llList2String etc.
_____________________
www.nandnerd.info http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
07-27-2006 21:53
The alternative would be to use the actual integer values, so you can type cast them easily. Rather than PRIM_TYPE you put in a 9, it makes the conversions easier too.
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
07-27-2006 22:09
dont use CSV use llParseString2List it allows you to use whatever seperator you want ie using | as the seperator "data|<0.00001,0.00002,0.000003>|59" would come out to be ... list whatever =["data","<0.00001,0.00002,0.00003>","59"] use List2String and typecasting here is the wiki page for phrase string to list ... http://secondlife.com/badgeo/wakka.php?wakka=llParseString2Listand here is a basic example, written a cupple days ago for something similar ... /54/e1/123970/1.html#post1171931
|
|
Armandi Goodliffe
Fantasy Mechanic
Join date: 2 Jan 2006
Posts: 144
|
07-27-2006 22:43
Thank you everyone, I used nand's solution and it worked great. I just replaced my list2csv commands and my whole project worked
|