Thanks for the reply Twirly. It seems after trying you suggested fix that the highlighted error may actually be needed here is the rest of the corresponding section of code:
if (_type == "count") then { _result = 0; } else { _result = []; };
{
if (typeOf _x in eastInfClasses && ( (alive _x && primaryWeapon _x != "") || !_alive ) ) then {
if (_type == "count") then { _result = _result + 1; } else { _result set [count _result, _x]; };
};
} forEach _arr2;
My guess is that I have not properly defined the units or factions, really not much a guess as it is all I have attempted to change.
I will keep at it.