Christina Halpin Posted July 10, 2011 Share Posted July 10, 2011 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 More sharing options...
Zena Juran Posted July 10, 2011 Share Posted July 10, 2011 Maybe if you post the code someone might be able to see something that you don't. :-) Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 10, 2011 Share Posted July 10, 2011 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 More sharing options...
Qie Niangao Posted July 10, 2011 Share Posted July 10, 2011 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 More sharing options...
Acheron Gloom Posted July 11, 2011 Share Posted July 11, 2011 Adding onto what Qie said, you're probably putting it above the default state, when it needs to be in a state. Next time post your script though, and it'd still help if you post it now. Link to comment Share on other sites More sharing options...
Christina Halpin Posted July 11, 2011 Author Share Posted July 11, 2011 Thanks. Acheron, you got it exactly right. Link to comment Share on other sites More sharing options...
Recommended Posts
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