Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What did I do wrong? Please Help!

Persian Chevalier
Registered User
Join date: 8 Jan 2007
Posts: 68
04-02-2008 15:30
I'm playing with this script by Billy Islander, and I get this error. Please help me figure out what I did wrong. Thanks!!

(30,77) : ERROR : Function call mismatches type or n
CODE


//set position script

//Prim Movement Script
//Billy Islander Feb.2008
//
//With greatest of thanks to rotation guru Nava Muni for his patience and help with this script.
//
//feel free to modify ,distribute , use in your builds , if you paid for this script IM me Billy Islander

// Sets the position of a prim or linkset relative to another keeping rotations and offsets intact.


vector myoffset = <0.0,270.00,-2.65>; // difference between x,y,z co-ordinates of controller(clock base) and pend (root prim ,point of rotation)
default
{
state_entry()
{

integer handle = llListen( 1101, "clock base", NULL_KEY, "" ); /// rename controller to the name of the object containg the controller script

}

listen(integer channel, string name, key id, string msg)
{
// "msg" received from controller is a vector and rotation separated by a ";"
// split these "two pieces" into a list for easy access

list pos_and_rot = llParseString2List( msg, [";"], [] );


// take the first list element and convert it from a string to a vector
vector mynewvector = (vector)llList2String(pos_and_rot, 37.182,180.679,23.203); // 0 is 1st list element


// take the second list element and convert it from a string to a rotation
rotation mynewrotation = (rotation)llList2String (pos_and_rot, 0.,270.,0.); // 1 is 2nd list element


llSay(0,"rotation values are" + llDumpList2String(pos_and_rot, "1" )); // allows us to see values sent by contoller

llSetPos(mynewvector + myoffset * mynewrotation);
llSetRot(mynewrotation);
llSay(0,"moving to" + (string)llGetPos());
llOwnerSay((string)llGetPos());
}
}
CODE
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
04-02-2008 16:05
CODE

// take the first list element and convert it from a string to a vector
vector mynewvector = (vector)llList2String(pos_and_rot, 37.182,180.679,23.203); // 0 is 1st list element


// take the second list element and convert it from a string to a rotation
rotation mynewrotation = (rotation)llList2String (pos_and_rot, 0.,270.,0.); // 1 is 2nd list element


should be

CODE

// take the first list element and convert it from a string to a vector
vector mynewvector = (vector)llList2String(pos_and_rot,0); // 0 is 1st list element


// take the second list element and convert it from a string to a rotation
rotation mynewrotation = (rotation)llList2String (pos_and_rot,1); // 1 is 2nd list element
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
04-02-2008 16:13
From: Persian Chevalier
I'm playing with this script by Billy Islander, and I get this error. Please help me figure out what I did wrong. Thanks!!


Incorrect use of the function llList2String.

http://www.cheesefactory.us/lslwm/llList2String.htm
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Persian Chevalier
Registered User
Join date: 8 Jan 2007
Posts: 68
04-02-2008 16:25
Thank You! That took care of the script, but nothing happened when I put the scripts in place. I expected the two pieces to jump together when I moved them, but that didn't happen. So, back to the drawing board.