The name 'Flip' does not exist in the current context

It worked fine a moment ago, but then it just came up an error. Help me please! Code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour {

    public float speed;
    public float jumpForce;
    private float moveInput;

    private Rigidbody2D rb;
   
    private bool facingRight = true;

    private bool isGrounded;
    public Transform groundCheck;
    public float checkRadius;
    public LayerMask whatIsGround;

    private int extraJumps;
    public int extraJumpsValue;



    void Start(){
        extraJumps = extraJumpsValue;
        rb = GetComponent<Rigidbody2D>();
    }

    void FixedUpdate(){

        isGrounded = Physics2D.OverlapCircle(groundCheck.position, checkRadius, whatIsGround);


        moveInput = Input.GetAxisRaw("Horizontal");
        Debug.Log(moveInput);
        rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);

        if(facingRight == false && moveInput > 0){
            Flip();
        } else if(facingRight == true && moveInput < 0){
            Flip();
        }
    }

    void Update() {

        if(isGrounded == true){
            extraJumps = extraJumpsValue;

        if(Input.GetKeyDown(KeyCode.UpArrow) && extraJumps > 0){
            rb.velocity = Vector2.up * jumpForce;
            extraJumps--;
        } else if(Input.GetKeyDown(KeyCode.UpArrow) && extraJumps == 0 && isGrounded == true){
            rb.velocity = Vector2.up * jumpForce;
        }
    }

    void Flip(){

        facingRight = !facingRight;
        Vector3 Scaler = transform.localScale;
        Scaler.x *= -1;
        transform.localScale = Scaler;
        }
    }
}

thankyou:)

For the if statement on line 48 you’re missing the closing “}”. That’s causing your Flip method. to actually be declared inside your Update method.

like this?

        if(isGrounded == true){
            extraJumps = extraJumpsValue;
        }

instead of

        if(isGrounded == true){
            extraJumps = extraJumpsValue;

thanks, sry if I ask much…

Yes exactly. You will also then end up having an extra } at the end of your file, so you should remove the weird one at line 65.

if I got it right, like this

        transform.localScale = Scaler;
    }
}
}

instead of thi

        transform.localScale = Scaler;
        }
    }
}

s