Quantcast
Channel: Latest Questions by GraviterX
Viewing all articles
Browse latest Browse all 122

What's wrong with this script?

$
0
0
I've been getting these errors. 1. (6,29): error CS1519: Unexpected symbol `:' in class, struct, or interface member declaration 2. (6,35): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration 3. (7,30): error CS1519: Unexpected symbol `:' in class, struct, or interface member declaration 4. (7,36): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration How do I fix these? The code: using UnityEngine; using System.Collections; public class Door: MonoBehaviour { public bool killDoor = false; public var winlevel : int = 1; public var loselevel : int = 1; // When player choose the door, pass the parameter here. void OnMouseDown () { if (killDoor) { print ("Game Ogre."); Application.LoadLevel(loselevel); } else { print ("Success!"); Application.LoadLevel (winlevel); } } }

Viewing all articles
Browse latest Browse all 122

Trending Articles



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