function Update
var rotation : float = Input.GetAxis (“Horizontal”) * rotationSpeed;
rotation *= Time.deltaTime;
Rigidbody.AddRelativeTorque (Vector3.back * rotation); this is my code but it stil says Assets/ballcontrol.js(7,4): BCE0044: expecting (, found ‘var’. and Assets/ballcontrol.js(7,8): BCE0044: expecting EOF, found ‘rotation’.
The problem is that you’ve omitted a lot of the syntax for a function. Check whatever tutorial or sample script you’re working from, and make sure you get all the bits - parentheses, curly brackets, etc.
function Update ()
(
var rotation : float = Input.GetAxis (“Horizontal”) * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
) it stil says - All compiler errors have to be fixed before you can enter gamemode.
What should i do- plzz give an understandbile explanation
This message is never going to be the only error message. (Although, it will be the most recent one, and will therefore show up at the bottom of the main Unity window.) Have you pulled up the Console window to see what the other errors shown are?