Ellie Oddenfen Posted June 26, 2011 Share Posted June 26, 2011 I'm very new to scripting. I'm trying to make a script that will have the object become fullbright when you step on it, and then go back to normal when you're not stepping on it. So this is what I have:default{ state_entry() { //do nothing... } collision_start(integer x) //when bumped { llSetPrimitiveParams([ llSetPrimitiveParams ([PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } collision_end(integer x) { llSetPrimitiveParams([ ([PRIM_FULLBRIGHT,ALL_SIDES,FALSE]); }}And when I try to save it it always says (11, 46) : ERROR : SYNTAX ERRORWhat the heck is a syntax error and how do I fix it? Link to comment Share on other sites More sharing options...
Osprey Therian Posted June 26, 2011 Share Posted June 26, 2011 default { state_entry() { //do nothing... } collision_start(integer x) //when bumped { llSetPrimitiveParams ([PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } collision_end(integer x) { llSetPrimitiveParams( [PRIM_FULLBRIGHT,ALL_SIDES,FALSE]); } } Link to comment Share on other sites More sharing options...
Osprey Therian Posted June 26, 2011 Share Posted June 26, 2011 *Puts on her Scripting Dunce pointy hat* I just took out that double ' llSetPrimitiveParams'. I have a nerve even pretending to help anyone == but that fixed it. Link to comment Share on other sites More sharing options...
Ellie Oddenfen Posted June 26, 2011 Author Share Posted June 26, 2011 Well. I am an idiot. Thanks for helping. Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 26, 2011 Share Posted June 26, 2011 It's easier to see the error if you don't split a statement in the middle so that it ends up on separate lines. Here's a more compact version of the corrected script that Osprey just posted..... default{ collision_start(integer x) //when bumped { llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } collision_end(integer x) { llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,FALSE]); }} Notice that the state_entry event is no longer there too. You don't really need it unless you are actually doing something when you enter the state. In general, a syntax error means that you have mistyped something .... misspelled a word, failed to capitalize something, forgotten to put a semicolon at the end of a statement, miscounted } brackets or parens ...... Unfortunately, the message is too vague to be helpful, which is why it makes sense to do scripting in a good offline editor that has more informative error messages. Link to comment Share on other sites More sharing options...
Acheron Gloom Posted June 26, 2011 Share Posted June 26, 2011 It will even give you errors that are lines ahead of where your actual fault was, for example if you leave the end off a vector or rotation. 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