Assets/MeleeSystem.js(13,18): BCE0044: expecting :, found '='.
Is the error I get . I have went through and done what it asks only to be in a slew of other errors
Here is my script.
#pragma strict
var Damage : int = 25;
var Distance : float;
function Update ()
{
if (Input.GetButtonDown("Fire1"))
{
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.forward, hit))
(
{Distance = hit.distance;
hit.transform.SendMessage("ApplyDamage"), Damage, SendMessageOptions.DontRequireReceiver);
}
}
;
↧