- Home /
The question is answered, right answer was accepted
BCE0044: expecting ':', found '}'. Again.
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.
Answer by DaveA · Mar 01, 2013 at 09:40 PM
Application.LoadLevel("Epicmap")
Where's the ; ?
Also you have a semicolon at the end of you if statement. That should not be there.
^ Didn't even notice that lol. Change:
if(Input.Get$$anonymous$$ey("e") && showText == true);
to
if(Input.Get$$anonymous$$ey("e") && showText == true)
Follow this Question
Related Questions
How would I get camera bobbing? 0 Answers
Expecting EOF Found } 3 Answers
Unknown identifier "clone"? 0 Answers
UnlitAlpha shader script not working 1 Answer
BCE0044 and UCE0001 Problems In My Script ! Pleeeease Help ! 2 Answers