- Home /
This question was
closed May 31, 2014 at 12:40 PM by
meat5000 for the following reason:
The question is answered, right answer was accepted
Animation Error "unexspected token "if"
Can someone help me ?
#pragma strict
function Update ()
if (Input.GetButton("Fire1"));
{
{
{
animation.Play("Fackelvorn");
}
}
}
Comment
Answer by meat5000 · May 31, 2014 at 10:29 AM
#pragma strict
function Update ()
{ //<----Brace Here Opens Update
if (Input.GetButton("Fire1")) //<----You have braces so dont put semicolon
{ // <----Brace here opens if statement
animation.Play("Fackelvorn");
} // <----Brace here closes if statement
} // <----Brace here Closes Update
No problem. Click the tick if it answered your question :)
Follow this Question
Related Questions
AnimationEvent has no receiver, but there is no AnimationEvent 1 Answer
install Animation Riggit 0 Answers
Animation for weapon plays on game start instead of when i attack 2 Answers
The animation state could not be played because it couldn't be found! 3 Answers
Can the animation editor create local rotational data? 3 Answers