function PlayerAnims()
{
if (PlayerState == 0);
{
PlayerAnimSec.animation.CrossFade("IDLE ANIMATION");
else if (PlayerState == 1);
{
PlayerAnimSec.animation.CrossFade("WALKING ANIMATION");
}
else if (PlayerState == 2);
{
PlayerAnimSec.animation.CrossFade(“SPRINTING ANIMATION”);
}
}
Here’s what the console says:
Assets/Player ANIMATION.js(37,60): BCE0044: expecting :, found ‘;’.
Line 37 is the line that says:
PlayerAnimSec.animation.CrossFade(“IDLE ANIMATION”);
It is most likely to do with the closed bracket and the semi-colon but that’s just what the console says. I’m not sure if it is pin-point accurate because I’m not that experienced.
I think that the problem is throughout the other two lines as well which look almost exactly the same as the one mentioned:
PlayerAnimSec.animation.CrossFade("SPRINTING ANIMATION");
AND
PlayerAnimSec.animation.CrossFade(“WALKING ANIMATION”);
I’m relatively new to programming and Unity3d; so the simpler the better,
I’ve definitely posted the codes right but some of the brackets may have been posted in this forum wrongly; but it should be okay.
Any Ideas?
Thanks In Advance!