Code error:,,assets controller cs 4,40 error cs1514 expected",Code error :,,assets controller cs 4,40 error cs1514 expected"

I have this code and I cant find the issue:
public float movementSpeed;
public Rigidbody2D rb;

float mx;

private void Update() {
mx = Input.GetAxisRaw("Horizontal");
}

private void FixedUpdate() {
Vector2 movement = new Vector2(mx * movementSpeed, rb.velocity.y);

rb.velocity = movement;
}

Hi! The compiler is expecting an opening curly brace ‘{’ around line 4 of your script. Since nothing of what you sent seems seems to be wrong, I think that the code just above it is probably missing something.

public class MyClass : MonoBehaviour
{  //<-- is the curly bracket here missing?
    public float movementSpeed;
    public Rigidbody2D rb;
    //...

If this doesn’t help, please send the rest of the script as well.