- Home /
I need help with an error
My javascript is:
function OnMouseEnter()
{
renderer.material.color = Color.blue;
}
function OnMouseExit
{
renderer.material.color = Color.white
}
function.OnMouseUp { Application.LoadLevel(1) }
Every time I start up my game it says "Assets/NewBehaviourScript 2.js(17,1): BCE0044: expecting EOF, found 'function'."
What should I do?
Please format your code correctly so answerers can more easily read it by indenting four spaces to create a code block (see http://answers.unity3d.com/editing-help). Thank You!
Answer by Mike 3 · Nov 20, 2010 at 06:45 PM
you're missing () after OnMouseExit and OnMouseUp, you have a . before OnMouseUp, and you're missing the semicolons after Application.LoadLevel(1) and Color.white
Your answer
Follow this Question
Related Questions
Gun recoil/hitback animation problem 1 Answer
Basic on collision play animation code not working 1 Answer
BCE0044 error: OnControllerColliderHit 2 Answers
(10,47): BCE0044: expecting :, found '='. 2 Answers
script error GUI super simple code 3 Answers