Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

how can i fix this error? cs0501

$
0
0
im trying to make a platformer for ios but i cant get the int code to work for the buttons. it just says Assets/Scripts/Player.cs(10,14): error CS0501: 'Player.move(int)' must have a body because it is not marked abstract,extern, or partial public GameObject menu; // Assign in inspector private bool isShowing; private bool isGrounded; public Rigidbody2D rb; public float movespeed; public void move(int mDir); void Update() { if (Input.GetKeyDown("escape")) { isShowing = !isShowing; menu.SetActive(isShowing); } if (mDir == 1) { rb.velocity = new Vector2(-movespeed, rb.velocity.y); } if (mDir == 2) { rb.velocity = new Vector2(movespeed, rb.velocity.y); } if (mDir == 3 && isGrounded == true) { rb.velocity = new Vector2(movespeed, rb.velocity.x); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>