- Home /
Question by
killerstud3 · Jul 27, 2011 at 01:43 AM ·
errorsyntax-erroruce0001
UCE0001: ';' expected. Insert a semicolon at the end.
I am making a script and it says i am missing a semicolon when i am most certainly not
here is the script.
var LookAtTarget : Transform;
function Awake()
{
if(!LookAtTarget)
{
LooAtTarget = GameObject.FindWithTag("Player").Transform;
}
}
function Update ()
{
//transform.LookAt(LookAtTarget);
var targetRotation - Quaternion.LookRotation(target.position - transform.position, Vector3.up);;;;;;
transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * 2.0);
}
Comment
you can format your code by selecting it and hitting that 010101 button above the edit field
Best Answer
Answer by Joshua · Jul 27, 2011 at 01:52 AM
What DaveA correctly pointed out, as well as
GameObject.FindWithTag("Player").Transform;
Transform is the name of the class, gameObject.transform refers to the GO's tranform component. So here you want the t to be non capitalized.
Your answer
Follow this Question
Related Questions
Desintergrate Enemies on Dying 4 Answers
Collision Detector script 1 Answer
script help 2 Answers
whats wrong wrong with my script 4 Answers
at booster to an object 0 Answers