jump physics

help me with this script it doesnt work i get alot of errors like:

error CS0246: The type or namespace name ‘SDL_Event’ could not be found (are you missing a using directive or an assembly reference?)

public class Jump : MonoBehaviour{}


     public partial class Player
{
    public void HandleEvents(SDL_Event @event)
    {
        if (@event.type == SDL_KEYDOWN)
        {
            switch (@event.key.keysym.sym)
            {

                case SDLK_w:
                    if (!jumping)
                    {
                        jumping = true;
                    }
                    break;
            }
        }
        //Implementation
        if (jumping)
        {
            yPos -= yVel;
            yVel -= gravity;
        }
        else
        {
            yVel += 2;
        }
    }
    public bool CollisionWithGround()
    {
        if (yVel > 0)
        {
            return true;
        }

        return false;
    }
}

public partial class Game
{
    public void Logic()
    {
        //Collision with floor
        if (player.CollisionWithGround())
        {
            player.yVel -= 2;
            player.jumping = false;
        }

        player.yPos += player.yVel;
    }
}

Because this is a general scripting question and nothing to do with physics, you should ask questions like these on the scripting forum here.

Your code above though looks like (broken) C++ to me so it’ll never compile in Unity which uses C#. Your post really looks like this one too: https://www.reddit.com/r/Unity3D/comments/lt18hh/i_have_tried_to_make_a_jumping_script_but/