[Opensim-dev] System.InvalidCastException: Specified cast is not valid.
Kevin Cozens
kevin at ve3syb.ca
Mon Feb 14 18:46:19 UTC 2011
Ina Centaur wrote:
> In trying to apply a hair color change script, I encountered the above
> error. LSL @ http://pastebin.com/K6HnW1N4
The error is in the last argument you are passing in the list in the call to
llSetPrimitiveParams. It takes a float and you are passing a vector.
The details about the parameters lists can be found at:
http://lslwiki.net/lslwiki/wakka.php?wakka=llSetPrimitiveParams
The bit of code would be a bit more efficient if you were to save the result
from the call to llList2String/llGetLinkPrimitiveParams in a variable at the
top of the inner loop. In each of the if statements you would then use that
variable instead of having to do the pair of calls for each of the conditionals.
More information about the Opensim-dev
mailing list