NPC Find Food Water?

Hey so im trying to make it so that when Thirst or Hunger get to X value it searches for the closest Object with the Tag with Food or water but ran into some errors last hour and push in right direction would help? thanks guys

using System.Collections;

public class CreatureManager : MonoBehaviour 
{
	public float Health = 100f;
	public float Stanima = 100f;
	public float Hunger = 100f;
	public float Thirst = 100f;
	public float MatingTimer = 1f;
	public float HealthDropRate = 0f;
	public float StanimaDropRate = 0f;
	public float HungerDropRate = 0.1f;
	public float ThirstDropRate = 0.1f;
	bool THDropRate = true;
	
	void Start () 
	{
		StartCoroutine(HungerDropR());
		StartCoroutine(ThirstDropR());
	}

	void Update () 
	{
		if (Hunger > 0)
		FindClosestRawMeat ();
	}

	IEnumerator HungerDropR ()
{
	while (THDropRate)
	{
		Hunger -= HungerDropRate;
		yield return new WaitForSeconds (60);
	}
}

	IEnumerator ThirstDropR ()
{
	while (THDropRate)
	{
		Thirst -= ThirstDropRate;
		yield return new WaitForSeconds (60);
	}
}

	GameObject FindClosestRawMeat() {
		gos = GameObject.FindGameObjectsWithTag("RawMeat");
		distance = Mathf.Infinity;
		foreach (GameObject go in gos) {
			Vector3 diff = go.transform.position - transform.position;
			float curDistance = diff.sqrMagnitude;
			if (curDistance < distance) {
				closest = go;
				distance = curDistance;
			}
		}
		return closestRawMeat;
	}

}

Error #1: The ‘closestRawMeat’ variable you are returning is not declared in the script. Also it is not assigned any value also in your script. You need to declare the variable like

GameObject closestRawMeat;

and also assign your required game object in your findClosestRawMeat() function.

Error #2: You need to declare your distance variable like

float distance = Mathf.Infinity;

Error #3: Same as above, you need to declare your gos variable but as an array;

GameObject[] gos = GameObject.FindGameObjectsWithTag("RawMeat");

All these errors mean that you need to declare your variables with their type before you use them.