- Home /
Error BCE0044 && UCE0001
#pragma strict
var isPaused:boolean = false;
var starttime:float;
var timeRemaining:float;
function Start () {
//guiText.material.color = Color.black;
starttime = 5.0;
}
function Update () {
if(!isPaused){
DoCountdown();
}
}
function DoCountdown(){
timeRemaining = starttime - Time.time;
if(timeRemaining<0){
timeRemaining = 0;
isPaused = true;
TimeIsUp();
Debug.Log("Timeremaining = " + timeRemaining);
}
**function PauseClock () { //Error BCE0044 and UCE0001**
**isPaused = true; //BCE0044**
}
function UnpauseClock(){
isPaused = false;
}
function ShowTime(){
}
function TimeIsUp(){
Debug.Log("Time is Up!");
}
Error message in Debugger
Assets/Scripts/ClockScript.js(27,10): BCE0044: expecting (, found 'PauseClock'.
Assets/Scripts/ClockScript.js(27,23): UCE0001: ';' expected. Insert a semicolon at the end.
Assets/Scripts/ClockScript.js(28,18): BCE0044: expecting :, found '='.
Comment
Answer by whydoidoit · Jul 27, 2012 at 12:28 PM
You are missing a } on the function DoCountdown. It appears the if isn't closed.
Just tick my answer if you don't $$anonymous$$d :) Gets it off the unanswered list.
Your answer
Follow this Question
Related Questions
Javascript Expecting Errors ';' & '=' 0 Answers
scripting colliders errors 1 Answer
How can solve these errors in my java script 1 Answer
3 java errors on a basic shooting script? 2 Answers
Unity to Iphone Unity iPhoneTouchPhase.Ended problems 2 Answers