What is Wrong With This Section of my Script?

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");

}//

}

I am posting this question once more:

Here’s what the console says:

Assets/Player ANIMATION.js(44,5): UCE0001: ‘;’ expected. Insert a semicolon at the end.

Assets/Player ANIMATION.js(44,1): BCE0043: Unexpected token: else.

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!

Try this

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"); 
    }//

}