How to fix "UCE0001: ';' expected. Insert a semicolon at the end" error

Here is the script:

var horizontalSpeed = 2.0;

    var verticalSpeed = 2.0;

     

    function FixedUpdate ()

    {


    // Get the mouse delta. This is not in the range -1...1

     

    var h = horizontalSpeed * Input.GetAxis ("Mouse X");

    var v = verticalSpeed * Input.GetAxis ("Mouse Y");    

    Vector3 localForce = camera.TransformDirection(new Vector3(h, 0, v));

    localForce.y = 0;

    rigidbody.AddForce(localForce);

    }

ive tried adding the semicolon where it says, but that just makes the line useless and apparently thats not ok. help?

Line 20 looks like it’s cut-and-pasted from a c# example. Your code is presumably Javascript because you’re using var. (Yes, I know that c# also has vars.) Maybe convert line 20 into a JS-style variable declaration:

var localForce : Vector3 = camera.blahblahblah