Jump to content

Help with Elevator Script for SL20B exhibit


Pixels Sideways
 Share

You are about to reply to a thread that has been inactive for 330 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Holalala

I'm trying to figure out why I keep getting a syntax error at this line:

                 listen( integer channel, string name, key id, string message

Any help is much appreciated.   

And I'd love to move the elevator car slowly but just moving the avatar to the correct level is all I need for now.

Thankies

xo

pixels

 

 

//elevator simple

integer channel = -36903;

default
{
    state_entry() {
        llSitTarget(<0.15204, -0.06241, 1.08959>, <-0.00000, 0.00000, 1.00000, 0.00000>);
                
    }
        
    changed(integer change) {
        if (llAvatarOnSitTarget() != NULL_KEY) 
        {
            llSay(0, "SELECT A DESTINATON!");
            llSleep(01);
            //ELEVATOR MUSIC", 0.5);
                
                
            llRequestPermissions(llAvatarOnSitTarget(),
             PERMISSION_TRIGGER_ANIMATION); 
            } 
   
    }
    
    run_time_permissions(integer perm) 
    {
        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
        if (anim != "") 
        {
            llStopAnimation("sit");
            llStartAnimation(anim);
                            
//AVATAR SELECTS FLOOR FROM PANEL, CAR MOVES
    {
        llListen( -36903, "", NULL_KEY, "" );
    }
            
    listen( integer channel, string name, key id, string message 
        
{
    //GO TO GROUND
    if ( message == "GROUND" )
    {     
            llSetRegionPos(<45.21164, 161.45197, 28.00000>);   // GROUND
    }
    
    //GO TO UNDERGROUND
    else if ( message == "UNDER" )
    {
    llSetRegionPos(<45.21164, 161.45197, 34.00000>); // UNDER
    }
    
    //GO TO SPHERE1
    else if ( message == "SPHERE1" )
    {
         llSetRegionPos(<45.21164, 161.45197, 38.00000>);   // SHPERE ONE

    }
    //GO TO SPHERE TWO
    else if ( message == "SPHERE2" )
    {
         llSetRegionPos(<45.21164, 161.45197, 42.00000>);// SPHERE TWO
 
    }
    //GO TO SPHERE THREE
    else if ( message == "SPHERE3" )
    {
         llSetRegionPos(<45.21164, 161.45197, 46.00000>); // SPNERE THREE
 
    }
    //GO TO FARM
    else if ( message == "FARM" )
    {
    llSetRegionPos(<45.21164, 161.45197, 50.00000>);   // FARM

    }}


  
    llStopSound();
    

llSleep(1);
    llResetScript();
    
    

        }
    }
}

Link to comment
Share on other sites

Thanks Wulfie

 

fixed that, but still getting syntax error 

 

//elevator simple

integer channel = -36903;

default
{
    state_entry() 
    {
        llSitTarget(<0.15204, -0.06241, 1.08959>, <-0.00000, 0.00000, 1.00000, 0.00000>);
                
    }
        
    changed(integer change) 
        {
        if (llAvatarOnSitTarget() != NULL_KEY) 
        {
            llSay(0, "SELECT A DESTINATON!");
            llSleep(01);
            //ELEVATOR MUSIC", 0.5);
                
                
            llRequestPermissions(llAvatarOnSitTarget(),
             PERMISSION_TRIGGER_ANIMATION); 
            } 
            }
   
    
    
    run_time_permissions(integer perm) 
    {
        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
        if (anim != "") 
        {
            llStopAnimation("sit");
            llStartAnimation(anim);
                            
//AVATAR SELECTS FLOOR FROM PANEL, CAR MOVES
    {
        llListen( -36903, "", NULL_KEY, "" );
    }
            
    listen( integer channel, string name, key id, string message); 
        
{
    //GO TO GROUND
    if ( message == "GROUND" )
    {     
            llSetRegionPos(<45.21164, 161.45197, 28.00000>);   // GROUND
    }
    
    //GO TO UNDERGROUND
    else if ( message == "UNDER" )
    {
    llSetRegionPos(<45.21164, 161.45197, 34.00000>); // UNDER
    }
    
    //GO TO SPHERE1
    else if ( message == "SPHERE1" )
    {
         llSetRegionPos(<45.21164, 161.45197, 38.00000>);   // SHPERE ONE

    }
    //GO TO SPHERE TWO
    else if ( message == "SPHERE2" )
    {
         llSetRegionPos(<45.21164, 161.45197, 42.00000>);// SPHERE TWO
 
    }
    //GO TO SPHERE THREE
    else if ( message == "SPHERE3" )
    {
         llSetRegionPos(<45.21164, 161.45197, 46.00000>); // SPNERE THREE
 
    }
    //GO TO FARM
    else if ( message == "FARM" )
    {
    llSetRegionPos(<45.21164, 161.45197, 50.00000>);   // FARM

    }}


  
    llStopSound();
    

llSleep(1);
    llResetScript();
}}
    

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 330 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...