- Home /
Question by
CGCxXSMALLSXx · Aug 30, 2012 at 05:22 AM ·
Help animation error!
ok so i am making my weapon movements and i get this error
Assets/Walk.js(7,43): BCE0044: expecting :, found ';'.
function Update(){
if(Input.GetKeyDown("z"))
if(Input.GetKeyUp(";z"));{
animation.Play("Walk", PlayMode.StopAll);{
animation.Stop("Walk"));
}
}
Comment
Answer by fafase · Aug 30, 2012 at 05:25 AM
Your curly braces are a little messed up.
function Update(){
if(Input.GetKeyDown("z"))
animation.Play("Walk", PlayMode.StopAll);
else
animation.Stop("Walk"));
}
You do not need to check if the button is released, just use else, if nothing is down it means it is up.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Guy's that know the standard physics 1 Answer
Admob code question 1 Answer
3.5.7 Importing assets from asset store - kMetaAssetType 0 Answers
rotation of an object relative to its original position 2 Answers