This is because GameMaker changed the way how scripts work.
You have to put everything inside the "playerAnimateSprite" script into the curly brackets of a function:
function playerAnimateSprite()
{
// put code here
}
EDIT:
now I see Shaun already adressed this problem in a sticky comment under the yt video, have a look there for more information.