I am trying to apply damage to the player I got this error. error CS1525: Unexpected symbol (12,61)`’ .
using UnityEngine;
using System.Collections;
using Opsive.ThirdPersonController.Wrappers;
using UnityEngine.UI;
public class damaging : MonoBehaviour {
public GameObject Player;
private health HealthScript;
void Awake () {
GameObject Player = GameObject.FindWithTag("Player");
HealthScript = Player.GetComponent<Health>();
}
void Damage () {
GetComponent().Damage(5, Vector3.zero, Vector3.zero);
}
}
Show to whole script so that I can check what is wrong with your script.
– srikaran_p@importguru88 There is no way to GetComponent like you are getting. Correct ways is as follows. GetComponent().Damage(5,Vector3.zero,Vector3.zero);
– saud_ahmed020