Jump to content

syntax error in timer()


Christina Halpin
 Share

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

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

Recommended Posts

I admit, I am a complete newbie. I keep getting syntax error for timer(). At the start of the line. If I take everything out, I still get it. If I move it somewhere else, I still get it. If I promise God I will be good if it goes away, I still get it.. But if I change the name to timer2(), then it goes away.

Link to comment
Share on other sites

A syntax error at the start of a line usually means that the mistake is at the end of the previous one .... like a missing } bracket or ) parenthesis.  That sort of omission is maddeningly common -- I do it all the time, at least. If you use a good external editor, it will catch most errors like that.

ETA:  BTW, timer2() is not a valid event name.  You have to use only the ones that LSL provides.  You're not allowed to make up your own.

Link to comment
Share on other sites

Without seeing the code, this is really guesswork, but if timer2() is working, it must be defining a top-level function, not an event-handler within a state (such as default).

So maybe you were trying to define a function, and merely got in trouble using the name "timer" because it's a reserved word in LSL, where it can only be used to specify a handler for the timer event.

Link to comment
Share on other sites

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