Tuesday, December 02, 2008
USERLOGIN PASSWORD Remember?
You are here » Learning Center ยป Forums

Openlife Forums

 Openlife Grid Forums
Minimize
 
  Openlife Forums  Scripting  LSL Help  Door script error CS1031, 'Type expected'
Previous Previous
 
Next Next
New Post 4/20/2008 12:42 PM
User is offline Josh Noonan
24 posts
Openlife Newbie




Door script error CS1031, 'Type expected' 

I get this error when trying to run this script:

// *** Very simple door script ***
// *** by Samantha Phoenix ***
// *** ver 1.1 for OLG alpha .5 - Feb 21/08 ***

// *** User settings ***
integer doorDirection = 1;  // Use 1 or -1

// ***************************************************************
integer doorState = 0;
default
{
    state_entry()
    {
        llOwnerSay("Very simple door script by Samantha Phoenix");
    }

    touch_start(integer total_number)
    {
        //        string name = llDetectedName(0);
        if (doorState == 0)
        {
            //            llTriggerSound("Door open", 0.5);
            rotation rot = llGetRot();
            rotation delta = llEuler2Rot(<0,0,doorDirection*PI/4>);
            rot = delta * rot;
            llSetRot(rot);
            llSleep(0.25);
            rot = delta * rot;
            llSetRot(rot);
            doorState = 1;
        }
        else
        {
            //          llTriggerSound("Door close", 0.5);
            rotation rot = llGetRot();
            rotation delta = llEuler2Rot(<0,0,-doorDirection*PI/4>);
            rot = delta * rot;
            llSetRot(rot);
            llSleep(0.25);
            rot = delta * rot;
            llSetRot(rot);
            doorState = 0;
        }
    }
}

Can anyone see why?


There is no such thing as a "Co Incidence".
 
New Post 4/20/2008 12:58 PM
User is offline Osiris
61 posts
Openlife Apprentice




Re: Door script error CS1031, 'Type expected' 

I fixed it

 
Previous Previous
 
Next Next
  Openlife Forums  Scripting  LSL Help  Door script error CS1031, 'Type expected'
Privacy Statement | Terms Of UseAll Rights Reserved 2007,2008 3DX - Openlifegrid.com