I have a bike gameobject and a wheel gameobject. The bike has a script that make it moves. The wheels have a script that detects collision and turn true a grounded variable.
function OnCollisionEnter(collision:Collision)
{
if(collision.gameObject.tag == "Ground")
{
bike controller.grounded = true;
}
}
The console tells me that i have to put a semicolon at line 5(bike controller.grounded = true;)
The error lies exactly where the compiler is telling you. You have an (unexpected) space, so it warns and suggests adding a semicolon (i.e. "bike;")
Are you trying to call a variable that has a space in the name? i.e. "bike controller" ? Or setting a variable on a different script? Either way, what you have won't work.
If it's a variable, name it bikeController. If it's another script or static variable, apply those methods accordingly.