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

getting unity error CS1513 with all brackets closed

$
0
0
When I try to make an extra condition on my if statement using a public bool from another script, I get Assets\PipeMiddleScript.cs(22,151): error CS1513: } expected. Here is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PipeMiddleScript : MonoBehaviour { public LogicScript logic; // Start is called before the first frame update void Start() { logic = GameObject.FindGameObjectWithTag("Logic").GetComponent(); } // Update is called once per frame void Update() { } private void OnTriggerEnter2D(Collider2D collision) { if (collision.GetType().ToString().Equals("UnityEngine.CircleCollider2D") && collision.gameObject.layer == 3 && logic.bool.gameIsOver == false) // This is where the error is { logic.addScore(1); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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