- Home /
Question by
sameman · Mar 30, 2013 at 02:49 AM ·
error messagebce0044
BCE0044: expecting EOF, Found 'var'
Hi, I can't find a mistake in this script, maybe you can help me out here. It's a simple melee script. Thank you
var : TheDamage : int = 50;
var : Distance : float;
function Update ()
{
if (input.GetButtonDown("Fire"))
{
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
hit.trasnform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
}
}
}
Comment
Answer by aldonaletto · Mar 30, 2013 at 02:53 AM
There are extra ":" after var in the first two lines:
var : TheDamage : int = 50;
var : Distance : float;
They should be like this:
var TheDamage : int = 50;
var Distance : float;
Your answer
Follow this Question
Related Questions
expecting EOF, found '}'. (BCE0044) 2 Answers
Enable and Disable VR mode at runtime On Devices(Android/IOS) 2 Answers
OnEnable called by disabled object 0 Answers
Trouble Calling a Function from Another Script 2 Answers
Unexcepted symbol 2 Answers