need help

for some reason thats beyond me this damn script wont run due to a parsing error in monodevelop help please.! the parsing error is on the debug btw
using UnityEngine;
using System.Collections;

public class PlayerAttack : MonoBehaviour {
public GameObject Target;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (Input.GetKeyDown (KeyCode.F)) {
Attack();
}

}

private void Attack() {
float distance = Vector3.Distance (Target.transform.position, transform.position);

Vector3 dir = (Target.transform.position - transform.position).normalized;

float direction = Vector3.Dot(dir, transform.forward)

Debug.Log(direction);

if (distance < 3) {
if(direction > 0) {
EnemyHealth eh = (EnemyHealth)Target.GetComponent (“EnemyHealth”);
eh.Addjustcurrenthealth (-10);
}
}
}
}

hi, welcome to the forums, please use [code ] [/code ] tags when pasting in code (there is a sticking in the scripting section about this for more info if you have issues getting it to work). Also, when posting about errors please include the full error message, it has line numbers (as will code pasted with code tags) which really helps people help you…

oh and you’re missing the ; at the end of the line above the “debug” line

1 Like

thanks a lot for some reason i just couldnt find it