- Home /
Question by
Jordan0159 · Jan 05, 2014 at 06:53 AM ·
function update
Error BCE0044: unexpected char: 0xFEFF. (BCE0044) (Assembly-UnityScript)
Hey, I was recently following the tutorial here http://www.youtube.com/watch?v=hCysoAoV3dc and I encountered this error.
My code:
#pragma strict
var moveUp : KeyCode;
var moveDown : KeyCode;
var speed : float = 10;
function Update ()
{
if (Input.GetKey(moveUp))
{
rigidbody2D.velocity.y = speed;
}
else if (Input.GetKey(moveDown))
{
rigidbody2D.velocity.y = speed *-1;
}
else
{
rigidbody2D.velocity.y = 0;
}
}
Comment
nothing wrong with this part of the code, what line gives the error? note, it gives the Script name and Line Number of the error in the error message, that should help you find the relevant part.. for example:
Assets/Hello.js(10,12)
would mean the prob is in the script called "Hello", 10th line, 12th character(of line 10)..
if there is no visible error once you find the line, try re-typing it by hand, sometimes weird stuff can happen if you copy/paste code..