Help in solving mistake in my AI code

I`ve made an AI script, that finds objects with scripts AImobs and moves them to objects with scripts Spot. AI is choosing that spot that has biggest bestRate. With one mob i have no problems, it chooses the spot goes on it and captures, but i want mobs to go to empty spots. So Spot script has boolean botOnSpot, which is equating with variable in AImobs script “botNumber”, and im not moving mob.
if botOnSpot = botNumber. And only one mob is going to right spot, others mobs are going to another spot, but together. How can i solve this?Sorry for this frustrating scripts! I think this lines are not correct:

			if(Spots[pointNumber].botOnSpotNumber == AImobs*.botNumber)*
  •   		{*
    

AImobs.transform.position = Vector3.MoveTowards(AImobs_.transform.position,Spots[pointNumber].transform.position,AIspeed * Time.deltaTime);
AImobs*.transform.LookAt(Spots[pointNumber].transform.position);
}
else*

* {
AImobs.transform.position = Vector3.MoveTowards(AImobs.transform.position,Spots[pointNumber+1].transform.position,AIspeed * Time.deltaTime);
AImobs.transform.LookAt(Spots[pointNumber+1].transform.position);*_

* }*
AI.script
public class AI : MonoBehaviour
{
* static public int botNumber = 0;*
*public AIMOB[] AImobs; *
* public Spot[] Spots;*
* public GameObject[] SpawnPoints;*
* public float distanse;*
* public float AIspeed = 100f;*
* float[] Massive;*
* int pointNumber;*
* float a; *
* int g;*

* void Start ()*
* { *
* Spots = FindObjectsOfType(typeof(Spot)) as Spot[];*
* Massive = new float[Spots.Length]; *
* } *

* void Update ()*
* { *
* AImobs = FindObjectsOfType(typeof(AIMOB)) as AIMOB[];*

* if(AImobs != null)*
* { *

* SortPoints();*
* Debug.Log(pointNumber); *
* for(int i=0;i<AImobs.Length;i++)*
* {*

_ if(Spots[pointNumber].botOnSpotNumber == AImobs*.botNumber)
{
AImobs.transform.position = Vector3.MoveTowards(AImobs.transform.position,Spots[pointNumber].transform.position,AIspeed * Time.deltaTime);
AImobs.transform.LookAt(Spots[pointNumber].transform.position);
}
else*

* {
AImobs.transform.position = Vector3.MoveTowards(AImobs.transform.position,Spots[pointNumber].transform.position,AIspeed * Time.deltaTime);
AImobs.transform.LookAt(Spots[pointNumber].transform.position);
}
}
} *_

* }*

* void SortPoints()*
* { *
* for(int i = 0;i<Spots.Length;i++)*
* { *
Massive = Spots*.bestRate;*
* }*
* a = Massive[0];*
* for(int i = 0;i<Massive.Length;i++)*
* { *
_ if(a<Massive )
* {
a = Massive;
pointNumber = i;
}
}
}
}*

Spot.script
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Spot : MonoBehaviour {_

* public int SpotState;*
* public int botOnSpotNumber = 0;*
* public float Timer = 5f;*
* public float TimerCooldown = 5f;*
* public float bestRate;*
* public float growthSpeed = 30f;*
* public float growthNumber = 3f;*
* public float growthSpeedCooldown = 30f;*
* public bool AIUnit;*
* bool PlayerUnit;*

* // Use this for initialization*
* void Start ()*
* { *

* }*

* void OnCollisionEnter(Collision collisioner)*
* {*

* if(collisioner.gameObject.tag == “AIUnit”)*
* {*
* AIUnit = true;*
* botOnSpotNumber = collisioner.gameObject.GetComponent().botNumber;*

* }*
* else*
* {*
* PlayerUnit = true;*

* }*
* }*
* void OnCollisionExit(Collision collisioner)*
* {*
* if(collisioner.gameObject.tag == “AIUnit”)*
* {*

* botOnSpotNumber = 0;*
* AIUnit = false; *
* }*
* else*
* {*
* PlayerUnit = false;*
* bestRate = growthNumber/growthSpeed;*
* }*

* }*
* // Update is called once per frame*
* void Update ()*
* { *

* if(AIUnit)*
* {*

* if(SpotState == 1) *
* {*
* Timer -= Time.deltaTime;*

* if(Timer <=0)*
* {*
* SpotState = 2;*
* Timer = TimerCooldown;*
* }*
* }*
* if(SpotState == 2)*
* {*
* Timer -= Time.deltaTime; *
* if(Timer <=0)*
* {*
* SpotState = 3;*
* Timer = TimerCooldown;*
* }*
* }*
* }*
* else*
* { if(PlayerUnit == false)*
* Timer = TimerCooldown;*
* }*

* if(PlayerUnit)*
* {*

* if(SpotState == 3) *
* {*
* Timer -= Time.deltaTime;*

* if(Timer <=0)*
* {*
* SpotState = 2;*
* Timer = TimerCooldown;*
* }*
* }*
* if(SpotState == 2)*
* {*
* Timer -= Time.deltaTime; *
* if(Timer <=0)*
* {*
* SpotState = 1; *
* Timer = TimerCooldown;*
* }*
* }*
* }*
* else*
* { if(AIUnit == false)*
* Timer = TimerCooldown;*
* }*

* switch(SpotState)*
* {*
* case 1:*
* gameObject.tag = “PlayerPlanet”;*
* renderer.material.SetColor("TintColor", Color.blue);*
* if(PlayerUnit == true)
bestRate = 0;
else*

* bestRate = growthNumber / growthSpeed;
break;
case 2:
gameObject.tag = “NeutralPlanet”; _

renderer.material.SetColor("TintColor", Color.grey);*
* if(PlayerUnit == true)
bestRate = 0;
else*

* bestRate = growthNumber / growthSpeed;
break;*_

* case 3:*
* gameObject.tag = “AIPlanet”;*
* renderer.material.SetColor("TintColor", Color.red);*
* bestRate = 0;
break;*_

* } *

}
}
AImob.script
public class AIMOB : MonoBehaviour
{
* public int botNumber;*
* // Use this for initialization*
* void Start ()*
* {*
* botNumber = AI.botNumber;*
* AI.botNumber = AI.botNumber + 1;*

* }*

* // Update is called once per frame*
* void Update ()*
* {*

* }*
}

Looking at the first snippet - because I couldn’t bother reading through the rest, and you said the problem was there - I would change the behaviour so that one spot calls an available AIMob to their location, instead of having an AIMob go to a spot. This way, you can be sure only one mob is heading towards one spot.