Are you saving name of animation or number of animation? Cause you are loading name
More up to date tutorial