- Home /
error help
i am making a script but it says something can you help me?
Assets/My Stuff/scripts/TurretControl.js(48,52): BCE0044: expecting :, found '='.
function CanAttackTarget() { if(Vector3.Distance(transform.position, target.position) > range) {
return false;
}
return true;
}
InvokeRepeating("barrelAnimate", 0, 0.05);
function barrelAnimate() { if(LeftFlame && RightFlame) { if(LeftFlame.renderer.enabled) { LeftFlame.renderer.enabled = false; RightFlame.renderer.enabled = true; } else; { LeftFlame.renderer.enabled = true; RightFlame.renderer.enabled = false; } } else; { print("Effects on turret not set") } }
Answer by aldonaletto · Jul 27, 2011 at 11:51 PM
You must remove the ";" after "else"
You should also place the same ";" after the "print(...)" in the last line...
Answer by Graham-Dunnett · Jul 28, 2011 at 09:28 AM
Pro tip: The numbers in the brackets in the error tell you the line number and column number where the compiler encountered the error. Double-clicking the error message should take you to the exact line with the problem. Then it's just a case of figuring out what the compiler is telling you.
Your answer
Follow this Question
Related Questions
I need help with an error 1 Answer
script not working 2 Answers
Script error. Please Help! 4 Answers
BCE0044: expecting ':' found ';' 1 Answer
ShopScript.Js(49,17): BCE0044 expecting :, found GUI. 1 Answer