Reputation: 7
I got an error saying insert a semicolon at the end:
Assets/melee.js(13,17): UCE0001: ';' expected. Insert a semicolon at the end
My unity3d script:
#pragma strict
var TheDammage : int = 50;
var Distance = float;
var MaxDistance : float = 1.5;
var TheMace : Transform;
function Update() {
if (Input.GetButtonDown("Fire1")) {
GetComponent TheMace.<Animation>().Play("Attack");
}
}
function AttackDammage() {
//Attack function
var hit : RaycastHit;
if (Physics.Raycast (TheSystem.transform.position, TheSystem.transform.TransformDirection(Vector3.forward), hit)) {
Distance = hit.distance;
if (Distance < MaxDistance) {
hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
}
}==
}
Upvotes: 1
Views: 151
Reputation: 7100
At the bottom of your script, just remove the ==
that probably got added when pressing that key instead of backspace. Happens all the time...
Upvotes: 1