no overload for method takes 1 argument

I’m new to Unity. I went through the Survival Shooter tutorial, and decided to add a little Ally “Zombie” AI.
It has almost the same code as the normal Enemy AI, but I’ve changed it to target the Enemy instead of the Player. There is an error, however, in which it keeps on saying that there is “no overload for method “TakeDamage” takes 1 argument”. This is the AllyAttackCode:

using UnityEngine;
using System.Collections;

namespace CompleteProject
{
	public class AllyAttack : MonoBehaviour
	{
		public float timeBetweenAttacks = 0.5f;     // The time in seconds between each attack.
		public int attackDamage = 10;               // The amount of health taken away per attack.


		Animator anim;                              // Reference to the animator component.
		GameObject enemy;                          // Reference to the enemy GameObject.
		EnemyHealth enemyHealth;                  // Reference to the enemy's health.
		AllyHealth allyHealth;                    // Reference to this ally's health.
		bool enemyInRange;                         // Whether enemy is within the trigger collider and can be attacked.
		float timer;                                // Timer for counting up to the next attack.


		void Awake ()
		{
			// Setting up the references.
			enemy = GameObject.FindGameObjectWithTag ("Player");
			enemyHealth = enemy.GetComponent <EnemyHealth> ();
			allyHealth = GetComponent<AllyHealth>();
			anim = GetComponent <Animator> ();
		}


		void OnTriggerEnter (Collider other)
		{
			// If the entering collider is the player...
			if(other.gameObject == enemy)
			{
				// ... the player is in range.
				enemyInRange = true;
			}
		}


		void OnTriggerExit (Collider other)
		{
			// If the exiting collider is the player...
			if(other.gameObject == enemy)
			{
				// ... the player is no longer in range.
				enemyInRange = false;
			}
		}


		void Update ()
		{
			// Add the time since Update was last called to the timer.
			timer += Time.deltaTime;

			// If the timer exceeds the time between attacks, the player is in range and this enemy is alive...
			if(timer >= timeBetweenAttacks && enemyInRange && enemyHealth.currentHealth > 0)
			{
				// ... attack.
				Attack ();
			}

			// If the player has zero or less health...
			if(enemyHealth.currentHealth <= 0)
			{
				// ... tell the animator the player is dead.
				anim.SetTrigger ("EnemyDead");
			}
		}


		void Attack ()
		{
			// Reset the timer.
			timer = 0f;

			// If the player has health to lose...
			if(enemyHealth.currentHealth > 0)
			{
				// ... damage the player.
				enemyHealth.TakeDamage (attackDamage);

				}

			}
		}
	}

Well, in line 82 you call a method called “TakeDamage” which is defined in your “EnemyHealth” class. You try to pass the attackDamage as parameter. However the compiler tells you that the method that is defined inside the EnemyHealth class doesn’t take one parameter. That could mean it doesn’t take any parameters, or that it requires more parameters.

Which case it is we can’t say because it depends on the definition of the TakeDamage method inside your EnemyHealth script.

wait, what exactly did you change?