Assets/Scripts/Player.js(44,1): BCE0044: expecting EOF, found '{'.

Im trying to get my animations for idling, walking and sprinting to work but get expecting EOF error on line 44 and an Unexpecting token “Else” on line 39. When i take away the Else if from line 39 and 43 the errors go away but when i play my game im stuck in the sprinting animations.

Any help would be appreciated. Thanks.

2 Answers

2

Don’t put semicolons at the end of if statements - there’s three in your PlayerAnims function.

Thank you, im rather new to unity and got really frustrated when my code didn't work but after looking through it for ages it was just a simple noob mistake. Thanks again guys.

You have to remove semicolons after if and else if statements.