Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Why wont this work

$
0
0
I'm just starting so i dont know very much can anyone help this is the error Assets/Scripts/HurtPlayer.cs(26,39): error CS1501: No overload for method `HurtPlayer' takes `2' arguments here is the script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class HurtPlayer : MonoBehaviour { public int damageToGive = 1; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } public void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { Vector3 hitDirection = other.transform.position - transform.position; hitDirection = hitDirection.normalized; FindObjectOfType ().HurtPlayer(damageToGive, hitDirection); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>