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

Compilation error without reason?

$
0
0
Hi, whenever I start my script, it just says: expecting }, found else. I can't imagine why :( #pragma strict var timer: float = 0.5; // set duration time in seconds in the Inspector function Update() { timer -= Time.deltaTime; // I need timer which from a particular time goes to zero if (timer > 0); { } else // timer is <= 0 { if (gameObject.active) {gameObject.SetActive(false); Debug.Log("gudten morgen");} else {gameObject.SetActive(true); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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