Code problem

Hey i made a piece of code which if the player is falling then play an animation but i keep getting errors plz help

code: if(velocity.y > 2.0f)
{
Animation.play(falling);
}

Can you tell us what the errors are?

Animation.Play is not a static function.
It’s Play, not play.
The parameter to Play is a string, so I assume that falling is a string variable.
If it is falling the y velocity will be negative (unless your world is upside down).

Finally, use code tags when posting code.

[CODE]

code goes here

[/CODE]

It says velocity dosnt exist in any way

…have you declared a velocity variable?

Oh, now i see thanx ill give it a shot