Assets/script/Movement/js(25,12): BCE004: expecting ), found '{'.

I have this error message in my console and i don’t know how to solve it
(I’m very new to this so please help.)

#pragma strict
var playerAcceleration : float = 500;
var cameraObject : GameObject;
var maxSpeed : float = 20;
var horizontalMovement : Vector2;
var deacelerationX : float;
var deacelerationZ : float;
var jumpSpeed : float = 20;
var maxSlope : float = 60;
var grounded : boolean = false;


function Update () 
    {
       horizontalMovement = Vector2(rigidbody.velocity.x,rigidbody.velocity.z);
       if (horizontalMovement.magnitude > maxSpeed)
           {
               horizontalMovement = horizontalMovement.normalized;
               horizontalMovement *= maxSpeed;  
           }
       rigidbody.velocity.x = horizontalMovement.x;
       rigidbody.velocity.z = horizontalMovement.y;
      
        if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0
           {
               rigidbody.velocity.x = Mathf.SmoothDamp(rigidbody.velocity.x,0,deacelerationX, deaceleration);
               rigidbody.velocity.z = Mathf.SmoothDamp(rigidbody.velocity.z,0,deacelerationZ, deaceleration);
           }
    transform.rotation = Quaternion.Euler(0, cameraObject.GetComponent(MouseLook).CurrentYRotation,0);
    rigidbody().AddRelativeForce(Input.GetAxis("Horizontal")*playerAcceleration * Time.deltaTime,0,Input.GetAxis("Vertical")*playerAcceleration * Time.deltaTime);
    if (Input.GetButtonDown("Jump") && grounded)
           {
                  rigidbody.Addforce(0,jumpspeed,0);
           }

Line 24 doesn’t end with a closing bracket, which is what the compiler is looking for. Instead it finds an open-brace on line 25. You probably need to do some homework to learn more about JS.

In this line (24):

 if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0

you are missing a “)” at the end of the if statements. If statements always need () encapsulating the actual statement.

 if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0)

You can click on any parenthese and it will highlight it and it’s partner. Every parenthese needs exactly one partner.