(20,57): BCE0022: Cannot convert 'EnemyAI[]' to 'EnemyAI'.

var alert : boolean;
var caution : boolean;
var normal : boolean;
var alertTimer : float;
var cautionTimer : float;
var alertTime : float = 30;
var cautionTime : float = 30;
//CHASING
var statusGUI : UI.Text;
var guardSpawn : Transform;
//var enemy : GameObject;
var enemyUnit : GameObject;
var enemyAIScript : EnemyAI ;
var enemyHuntScript : EnemyHunt;

 function Start(){
 enemyUnit = GameObject.FindGameObjectsWithTag("Enemy");
 for(var i : int = 0; i < enemyUnit.Length; i++)
    {
 enemyAIScript _= enemyUnit*.GetComponents.<EnemyAI>();*_

enemyHuntScript = enemyUnit*.GetComponents.();*
}
//
// alert = false;
// caution = false;
// normal = true;

}
function Update(){

if(alert == true){
if(alertTimer >= 0){
print(“alert”);
statusGUI.text = "ALERT : "+alertTimer;
alertTimer -= Time.deltaTime;
enemyHuntScript.enabled = true;
enemyAIScript.enabled = false;
}else{
//ALERT FINISHED
//SWITCH TO CAUTION
ActivateCaution();
print(“CAUTION”);
statusGUI.text = “”;
}
}
//CAUTION
if(caution == true){
if(cautionTimer >= 0){
print(“CAUTION”);
statusGUI.text = "CAUTION : "+cautionTimer;
cautionTimer -= Time.deltaTime;
}else{
//
alert = false;
caution = false;
normal = true;
statusGUI.guiText.text = “”;
}
}
//NORMAL
if(normal == true){

alert = false;
caution = false;
print(“Normal”);
alertTimer = 30;
cautionTimer = 30;
statusGUI.text = “NORMAL”;
for(var a : int = 0; a < enemyAIScript.Length; a++)
{
enemyAIScript[a].enabled = true;

}
for(var b : int = 0; b < enemyHuntScript.length; b++){
enemyHuntScript**.enabled = false;**
}
}

}

function ActivateAlert(){
alert = true;
alertTimer = alertTime;
caution = false;
normal = false;
}

function ActivateCaution(){
caution = true;
cautionTimer = cautionTime;
alert = false;
normal = false;
}
ERROR :Assets/FORCE/Enemies/RegularUnits/ControlAI.js(20,57): BCE0022: Cannot convert ‘EnemyAI[]’ to ‘EnemyAI’.
EERROR :Assets/FORCE/Enemies/RegularUnits/ControlAI.js(20,57): BCE0022: Cannot convert ‘EnemyAI[]’ to ‘EnemyAI’.
Not really sure whats wrong here but I’m getting errors anyway. If you want to see what my script is about read my last question because its the same script(GameController/Manager script)
Thanks Stealth

You are defining a single script for return by placing the i in the square brackets and placing it in a single element by the same method but then you use GetComponents which returns an array.

Use GetComponent