I have a 6 line script meant for triggering an animation, the thing is when I try to test it unity comes up with an error in a 7th line of code, which does not exist. Does anyone have experience with such a problem? Thanks.
Well, what’s the error details?
Assets/Scripts/Motionscript.js(7,1): BCE0044: expecting }, found ‘’.
but my script doesnt even have a 7th line:
function OnTriggerEnter (other : Collision)
{
if(other.gameObject.name == “First Person Controller”)
{
animation.Play(“move”);
}
It’s telling you to put a closing bracket on the 7th line. To explain it further, the error is saying that it was expecting to find the closing bracket ‘}’ at line 7 but it found nothing and so it wants you to put the closing bracket ‘}’.
Omg stupid me! Now i see the mistake! Thanks!