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

error CS1501: No overload for method

$
0
0
Hi I've got a problem and i need help this has bean stuck on this for days and have not found a way to fix it so if u can help it will be greatly appreciated EnemyBehaviour.cs(19,25): error CS1501: No overload for method `TakeDamage' takes `0' arguments using UnityEngine; using System.Collections; public class EnemyBehaviour : MonoBehaviour { public int startingHealth = 10; public int EnemyHealth; lazerDamage lazer; void Start () { EnemyHealth = startingHealth; } void OnTriggerEnter (Collider other) { if(other.gameObject == lazer) { TakeDamage();// the error is hear } } void TakeDamage(int AttackDamage) { EnemyHealth -= AttackDamage; if(EnemyHealth <=0) { Death(); } } void Death() { Destroy (gameObject); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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