I have a problem unity says } expected, but I have no idea why this is happening it says problem is in line 153 this is my code Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { private float movementInputDirection; private int amountOfJumpsLeft; private bool isFacingRight = true; private bool isWalking; private bool isGrounded; private bool isTouchingWall; private bool canjump; private bool isWallSliding; private Rigidbody2D rb; private Animator anim; public int amountOfJumps = 1; private int facingDirection = 1; public float movementSpeed = 10.0f; public float jumpForce = 16.0f; public float groundCheckRadius; public float wallCheckDistance; public float wallSlideSpeed; public float movementForseOnAir; public float airDragMulltiplier = 0.95f; public float wallHopForce; public float walljumpForce; public Vector2 wallHopDirection; public Vector2 walljumpDirection; public Transform groundCheck; public Transform wallCheck; public LayerMask whatIsGround; void Start() { rb = GetComponent<Rigidbody2D>(); anim = GetComponent<Animator>(); amountOfJumpsLeft = amountOfJumps; wallHopDirection.Normalize(); walljumpDirection.Normalize(); } // Update is called once per frame void Update() { CheckInput(); CheckMovementDirection(); UpdateAnimations(); CheckIfCanJump(); CheckIfWallSliding(); } private void FixedUpdate() { ApplyMovement(); CheckSurroundings(); } private void CheckIfWallSliding() { if (isTouchingWall && !isGrounded && rb.velocity.y < 0) { isWallSliding = true; } else { isWallSliding = false; } } private void CheckSurroundings() { isGrounded = Physics2D.OverlapCircle(groundCheck.position, groundCheckRadius, whatIsGround); isTouchingWall = Physics2D.Raycast(wallCheck.position, transform.right, wallCheckDistance, whatIsGround); } private void CheckIfCanJump() { if ((isGrounded && rb.velocity.y < 0.01f) || isWallSliding) { amountOfJumpsLeft = amountOfJumps; } if (amountOfJumpsLeft <= 0) { canjump = false; } else { canjump = true; } } private void CheckMovementDirection() { if (isFacingRight && movementInputDirection < 0) { Flip(); } else if (!isFacingRight && movementInputDirection > 0) { Flip(); } if (Mathf.Abs(rb.velocity.x) > 0.01f) { isWalking = true; } else { isWalking = false; } } private void UpdateAnimations() { anim.SetBool("isWalking", isWalking); anim.SetBool("isGrounded", isGrounded); anim.SetFloat("yVelocity", rb.velocity.y); anim.SetBool("isWallSliding", isWallSliding); } private void CheckInput() { movementInputDirection = Input.GetAxisRaw("Horizontal"); if (Input.GetButtonDown("Jump")) { Jump(); } } private void Jump() { if (canjump && !isWallSliding) { rb.velocity = new Vector2(rb.velocity.x, jumpForce); amountOfJumpsLeft--; } else if (isWallSliding && movementInputDirection == 0 && canjump) ; //wall hop { isWallSliding = false; amountOfJumpsLeft--; Vector2 forceToAdd = new Vector2(wallHopForce * wallHopDirection.x * -facingDirection, wallHopForce * wallHopDirection.y); rb.AddForce(forceToAdd, ForceMode2D.Impulse); } else if ((isWallSliding || isTouchingWall) && movementInputDirection != 0 && canjump) { isWallSliding = false; amountOfJumpsLeft--; Vector2 forceToAdd = new Vector2(walljumpForce * walljumpDirection.x * movementInputDirection, wallJumpForce * walljumpDirection.y); rb.AddForce(forceToAdd, ForceMode2D.Impulse); } } private void ApplyMovement() { rb.velocity = new Vector2(movementSpeed * movementInputDirection, rb.velocity.y); if (isGrounded) { rb.velocity = new Vector2(movementSpeed * movementInputDirection, rb.velocity.y); } else if (!isGrounded && !isWallSliding && movementInputDirection != 0) { Vector2 forceToAdd = new Vector2(movementForseOnAir * movementInputDirection, 0); rb.AddForce(forceToAdd); if (Mathf.Abs(rb.velocity.x) > movementSpeed) { rb.velocity = new Vector2(movementSpeed * movementInputDirection, rb.velocity.y); } } else if (!isGrounded && !isWallSliding && movementInputDirection == 0) ; if (isWallSliding) { if (rb.velocity.y < -wallSlideSpeed) { rb.velocity = new Vector2(rb.velocity.x, -wallSlideSpeed); } } } private void Flip() { if (!isWallSliding) { facingDirection *= -1; isFacingRight = !isFacingRight; transform.Rotate(0.0f, 180.0f, 0.0f); } } private void OnDrawGizmos() { Gizmos.DrawWireSphere(groundCheck.position, groundCheckRadius); Gizmos.DrawLine(wallCheck.position, new Vector3(wallCheck.position.x + wallCheckDistance, wallCheck.position.y, wallCheck.position.z)); } }