Hi, I’m making an adventure game and I keep getting the " BCE0044: expecting :, found ‘}’." error again and again. This is the script that will show “Press E to exit” text and make the player exit the tavern:
private var showText : boolean;
function OnTriggerEnter () {
showText = true;
}
function OnTriggerExit() {
showText = false;
}
function OnGUI(){
if(showText) GUI.Label(Rect(500,500,Screen.width,Screen.height),"Press E to exit");
}
function Update()
{
if(Input.GetKey("e") && showText == true);
{
Application.LoadLevel("Epicmap")
}
}
I tried to remove few “}” and It worked, but the “Epicmap” level loaded immediately, not waiting to player enter trigger zone and press “E”. Any ideas?
PS: Sorry for my english, also I’m new to scripting and Unity, and this is my first question here :S
Also i saw the other tutorials about the BCE0044 error, but they didn’t helped.