Below is the problematic UnityScript that I have attempted to isolate:
var isCollideTurning : boolean;
function FixedUpdate () {
function OnCollisionEnter (){
isCollideTurning = true;
}
}
Even when I compiled it in an empty project, specially created for testing, I still get the following errors:
Script.js(7,34): BCE0044: expecting :, found '='.
Script.js(6,18): BCE0044: expecting (, found 'OnCollisionEnter'.
Script.js(6,37): UCE0001: ';' expected. Insert a semicolon at the end.
I have only been coding in UnityScript for under a week, and have no prior coding experience so I am not sure if I have simply made a glaring syntax error.
You are declaring a function within a function. That is not possible. Move the inner function OnCollisionEnter outside of the brackets of the FixedUpdate function.