- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
glenohumeral13 · Jun 17, 2014 at 04:31 AM ·
errorbce0044uce0001
BCE0044 error
So, my hunger code is supposed to subtract 1 from Hunger every 5 seconds after 300 seconds have passed. But I get BCE0044 and UCE0001 errors. This is my code;
#pragma strict
var Hunger:float;
var MaxHunger:float=100;
var timer:float;
function Start ()
{
Hunger=MaxHunger;
}
function Update ()
{
timer+=Time.deltaTime;
function hungerSub(){
setTimeout(
function() {
if(timer>=300)
{
Hunger-=1.0;
}
}, 5000);
}
}
And this is the error:
Can anyone help?
screen shot 2014-06-16 at 6.38.04 pm.png
(47.7 kB)
Comment
You cannot nest functions. You have the 'hugerSub()' nested inside Update, plus you have a function keyword without a name (still nested) at line 17.
Your answer
Follow this Question
Related Questions
3 java errors on a basic shooting script? 2 Answers
How can solve these errors in my java script 1 Answer
I need help with an error 1 Answer
Limit rotation for a statue puzzle 1 Answer
BCE0044 error 1 Answer