Jump to content

ARGHHH... ERROR : Name not defined within scope


Pixels Sideways
 Share

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

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

Recommended Posts

Hellooo

 

Need a little help.

 

I can't figure out the error message I keep getting re: what is not defined in scope.

 

This is my version of a simple blinker script:

 

I have versions with a timer but wanted to adjust the prim point light values and didn't want to  use a timer.

 


 
default
{
        state_entry()
        
           { llSetLinkPrimitiveParams
            (LINK_SET, [ PRIM_FULLBRIGHT, ALL_SIDES, FALSE,
             PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR, 1.0, 3.0, 0.6]);
        
llSleep (2.0);


        
            llSetlinkPrimitiveParams
            (LINK_SET, [PRIM_FULLBRIGHT, ALL_SIDES, TRUE,
             PRIM_POINT_LIGHT, TRUE, ZERO_VECTOR, 1.0, 3.0, 0.6]);
        
llSleep (2.0);

llResetScript(0);

                }
}

 

 

 

Thank you!

 

Link to comment
Share on other sites

Yup,

1 hour ago, Pixels Sideways said:

llResetScript(0);

is wrong.  That function does not take an argument.

More fundamentally, though, this script really ought to use a timer -- a very simple operation -- instead of using the clumsy alternative of restarting itself every four seconds. Even in a small script like this, this method is a poor use of server resources.  Instead, try:

integer iON;

default
{
    state_entry()
    {
        llSetTimerEvent(2.0);
    }

    timer()
    {
        iON = !iON;
         llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_FULLBRIGHT, ALL_SIDES, iON,
             PRIM_POINT_LIGHT, iON, ZERO_VECTOR, 1.0, 3.0, 0.6]);
    }
} 

  

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1637 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...