- Home /
BCE0044 expected EOF and } found 'else' Help me Please!!
So i have this code and i get warning bce0044 twice:
29,9 expected } found 'else'
34,9 expected EOF found 'else'
Now i have checked my whole script for open brackets but couldn't find any
i don't have much experience with coding so mabye that's why i don't see anything wrong
so can i hazz help plz??
var isLevelSelect1Button = false;
var isLevel2Button = false;
var isLevel3Button = false;
var isLevel4Button = false;
var isBackButton = false;
var isCredits5Button = false;
var isQuit1Button = false;
var isQuit2Button = false;
renderer.material.color = Color.white;
function OnMouseEnter ()
{
renderer.material.color = Color.red;
}
function OnMouseExit ()
{
renderer.material.color = Color.white;
}
function OnMouseUp ()
{
if ( isLevelSelect1Button );
{
Application.LoadLevel (1);
}
else if ( isLevel2Button );
{
Application.LoadLevel (2);
}
else if ( isLevel3Button );
{
Application.LoadLevel (3);
}
else if ( isLevel4Button );
{
Application.LoadLevel (4);
}
else if ( isBackButton );
{
Application.LoadLevel (0);
}
else if ( isCredits5Button );
{
Application.LoadLevel (5);
}
else if ( isQuit1Button );
{
Application.LoadLevel (6);
}
else if ( isQuit2Button );
{
Application.Quit ();
}
}
Answer by robertbu · Aug 09, 2014 at 10:33 AM
You have a ';' at the end of each one of your if() statements. Example:
if ( isLevelSelect1Button );
That semi-colon terminates the if(), so any 'else' is seen as an error. Remove the ';' from the end of lines 24, 39, 34, 39, 44, 49, 54, and 59...all of your if() clauses.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Animation spins wildly after completed 0 Answers
BCE0049 error with network script 0 Answers
NullReferenceException problem 2 Answers
Scripting Error! - UCE0001: ';' expected. Insert a semicolon at the end. 1 Answer