, the collection of scores was moved to the beginning of the script and the way it collects the data was altered :
private _scores = [];
// ----- Blufor side score line -----
private _name = toUpper "Team Blue";
private _totalKillsBLUE = 0;
private _totalKDRatioBLUE = 0;
private _totalFCBLUE = 0;
private _totalFSBLUE = 0;
private _totalDeathBLUE = 0;
// ----- Opfor side score line -----
private _name = toUpper "Team Red";
private _totalKillsRED = 0;
private _totalKDRatioRED = 0;
private _totalFCRED = 0;
private _totalFSRED = 0;
private _totalDeathRED = 0;
{
if !(side _x isEqualTo sideLogic) then
{
_scores append [[getPlayerScores _x, name _x, getPlayerUID _x, side _x]];
};
} forEach (allPlayers);
_scores sort false;
{
if (side _x isEqualTo west) then
{
private _scores = getPlayerScores _x;
_scores params [["_killsInfantry",0], ["_killsVehicle",0], ["_killsTank",0], ["_killsAircraft",0], ["_deaths",0], ["_killsTotal",0]];
_totalKillsBLUE = _totalKillsBLUE + _killsInfantry;
private _ESM_FC = "ESM_" + (getPlayerUID _x);
_totalFCBLUE = _totalFCBLUE + (missionNamespace getVariable [_ESM_FC, 0]);
private _ESM_FS = "ESM_SCORE_" + (getPlayerUID _x);
_totalFSBLUE = _totalFSBLUE + (missionNamespace getVariable [_ESM_FS, 0]);
_totalDeathBLUE = _totalDeathBLUE + _deaths;
};
} forEach allPlayers;
{
if (side _x isEqualTo east) then
{
private _scores = getPlayerScores _x;
_scores params [["_killsInfantry",0], ["_killsVehicle",0], ["_killsTank",0], ["_killsAircraft",0], ["_deaths",0], ["_killsTotal",0]];
_totalKillsRED = _totalKillsRED + _killsInfantry;
private _ESM_FC = "ESM_" + (getPlayerUID _x);
_totalFCRED = _totalFCRED + (missionNamespace getVariable [_ESM_FC, 0]);
private _ESM_FS = "ESM_SCORE_" + (getPlayerUID _x);
_totalFSRED = _totalFSRED + (missionNamespace getVariable [_ESM_FS, 0]);
_totalDeathRED = _totalDeathRED + _deaths;
};
} forEach allPlayers;