I rewrote this in various ways, but nothing up to now would do the trick. I made sure that everything is tagged correctly and has the right scripts attached as you can see in the pic.
This is the stripped code of the class (CrowdControl) that is supposed to:
find all objects tagged "Fighter"
fill a list with all FighterControl scripts attached to them
private List<FighterControl> fightersScripts;
private void Start()
{
InitializeFighters();
}
private void InitializeFighters() // first line that the NullReferenceException is pointing at !!!!
{
GameObject[] tempfightersGM = GameObject.FindGameObjectsWithTag("Fighter");
for (int i = 0; i < tempfightersGM.Length; i++)
{
fightersScripts.Add( tempfightersGM[i].GetComponent<FighterControl>()); // second line that the NullReferenceException is pointing at !!!!
}
}
Pic of the editor including the inspector view of the 2 game objects