Begginer Here: probably a simple Error i can not resolve!
This is the error i got: Assets/ballcontrol.js(9,53): UCE0001: ';' expected. Insert a semicolon at the end.
This is my code: #pragma strict
var rotationSpeed = 100;
function Update () { var rotation : float = Input.GetAxis ("Horizontal") rotationSpeed; rotation = Time.deltaTime; rigidbody;AddRelativeTorque {Vector3.back * rotation}; }
I get that i need to put a semicolon as the 53rd characted of the 9th row, however that character is the 't' in Vector :/
pls help me!
Answer by meat5000 · Oct 13, 2015 at 12:00 PM
It is perfectly normal, upon fixing the listed errors, to be presented with a fresh list of errors.
This is because the compiler gets mixed up. When it hits the first error, from then on it can have trouble interpreting the remaining code, given that it is not what is expected.
This is why a missing semi-colon will present parsing errors as well as unexpected symbol errors, even though it is just one problem.
You problem is greater.
Line 9 needs a lot of work.
http://docs.unity3d.com/ScriptReference/Rigidbody.AddRelativeTorque.html
AddRelativeTorque is a function call so must be structured so.
rigidbody.AddRelativeTorque ( PARAMETERS ); //ROUND BRACKETS
you have
rigidbody.AddRelativeTorque; <-- You have ended the line early, then
{ Vector3.back * rotation } <-- used the wrong brackets.
Answer by landon912 · Oct 12, 2015 at 11:34 PM
You have a semicolon in the middle of that line where a period should be.
@landon91235 Still didnt fix the original error.That just added an extra error, this time it asked me to put a semicolon at the end of rigidbody.AddRelativeTorque.I have no other errors except for the one i specified above.
Your answer
Follow this Question
Related Questions
Unity Editor Error Build,Unity Editor Error build 0 Answers
I got a weird error: 0 Answers
Unity point light not working in some android devices . 1 Answer
Can't launch my Project from Unity Hub 0 Answers