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

Error CS1519 and Error CS8025

$
0
0
This is my first time ever coding, and it's for the Roll-a-Ball tutorial, and I'm kind of stuck because I don't think I can remove any of the symbols it's telling me to remove. Here are the error codes: Assets/Scripts/PlayerController.cs(40,5): error CS1519: Unexpected symbol `{' in class, struct, or interface member declaration Assets/Scripts/PlayerController.cs(41,24): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration Assets/Scripts/PlayerController.cs(41,53): error CS1519: Unexpected symbol `(' in class, struct, or interface member declaration Assets/Scripts/PlayerController.cs(43,1): error CS8025: Parsing error Here's the script: using UnityEngine; using UnityEngine.UI; using System.Collections; public class PlayerController : MonoBehaviour { public float speed; public Text countText; private Rigidbody rb; private int count; void Start () { rb = GetComponent(); count = 0; SetCountText (); } void FixedUpdate() { float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical"); Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical); rb.AddForce(movement * speed); } void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Pick Up")) { other.gameObject.SetActive (false); count = count + 1; SetCountText (); } } void SetCountText (); { countText.text = "Count: " + count.ToString (); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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