- Home /
How to fix error BCE0089:?
I'm making a zombie apocalypse game and I got the error message when I was trying to make a zombie spawner: Assets/Scripts/'Spawner'.js(16,10): BCE0089: Type 'Spawner' already has a definition 'Start()'. The exact line of code is:
function Start()
All of the code is:
#pragma strict
function Start () {
}
function Update () {
} // The object to be spawned
var SpawnObject : GameObject;
// in seconds
var SpawnStartDelay : float = 0;
var SpawnRate: float = 5.0;
function Start()
{
InvokeRepeating("Spawn", SpawnStartDelay, SpawnRate);
}
// Spawn the SpawnObject
function Spawn()
{
Instantiate(SpawnObject, transform.position, transform.rotation);
}
(I copied the code from here:http://www.instructables.com/id/Intro-to-Unity/step11/Spawning-Zombies/) Sorry if the answer is really simple i'm kinda new to unity. Thanks in advance:)
Answer by robertbu · Feb 16, 2014 at 01:44 AM
You have the Start() function in your code twice. Delete lines 3 - 5.
Your answer
Follow this Question
Related Questions
How to know if a Script exists on another game object? C# 3 Answers
how can i fix NSIS error in intall unity 4.3.0? 0 Answers
Accessing Child GameObject 2 Answers
Drivable hovercraft 1 Answer
How to fix this error?? 0 Answers