Walking FPS Movement

Hey all! I had a working project in Unity, but It got messed up. I found this script but It’s not working. It’s for the first person camera to bob up and down when walking. I was wondering if anyone could fix it. The compiler errors are these:

Walk ANIM.js(11,22): BCE0005: Unknown identifier: “Horizontal”
Walk ANIM.js(12,7): BCE0005: Unknown identifier: “Abs”

I did not make this script! I got it online on Unity answers. BTW right now I only have a character FPS motor attached to the camera if I need anything else, please let me know thanks!

So, it would appear the error is based on typos in the code:

    private var timer = 0.0;
    
    var bobbingSpeed = 0.18;
    var bobbingAmount = 0.2;
    var midpoint = 2.0;
     
    function Update()
    {
        waveslice = 0.0;
        horizontal = Input.GetAxis("Horizontal");
        vertical = Input.GetAxis("Vertical");

        // Horizontal was capitalized in this conditional
        if(Mathf.Abs(horizontal) == 0 &&
        //Greater than symbol where dot operator was
        // necessary in Mathf.Abs(vertical) call
           Mathf.Abs(vertical) == 0)
`          {
               timer = 0.0;
           }
           else 
           {
               waveslice = Mathf.Sin(timer);
               timer = timer + bobbingSpeed;

               if(timer > Mathf.PI * 2)
               {
                 timer = timer - (Mathf.PI * 2);
               }
            }

        if(waveslice != 0)
        {
           translateChange = waveslice * bobbingAmount;
           totalAxes = Mathf.Abs(horizontal) + Mathf.Abs(vertical);
           totalSxes = Mathf.Clamp (totalAxes, 0.0, 1.0);
           translateChange = totalAxes * translateChange;
           transform.localPosition.y = midpoint + translateChange;
        }

        else 
        {
           transform.localPosition.y = midpoint;
        }
    }