From 80a49beb3651496df10d6e00b7f2f46141d20913 Mon Sep 17 00:00:00 2001 From: SilenceIsFatto <78276788+SilenceIsFatto@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:56:02 +0100 Subject: [PATCH] Change isNil check May fix #267 --- .../core/functions/Base/fn_statistics.sqf | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/A3A/addons/core/functions/Base/fn_statistics.sqf b/A3A/addons/core/functions/Base/fn_statistics.sqf index d0cf63bff4..c10765cebd 100644 --- a/A3A/addons/core/functions/Base/fn_statistics.sqf +++ b/A3A/addons/core/functions/Base/fn_statistics.sqf @@ -11,8 +11,6 @@ if (isNull (uiNameSpace getVariable "H8erHUD")) exitWith {}; private _display = uiNameSpace getVariable "H8erHUD"; if (isNil "_display") exitWith {}; -waitUntil {sleep 0.5;!(isNil "theBoss")}; - private _textX = nil; private _setText = _display displayCtrl 1001; @@ -65,6 +63,25 @@ switch (gameMode) do { _aggrString = _aggrString + _rivalsActivityTxt; +if (isNil "theBoss") exitWith { + _textX = format [ + "" + (localize "STR_info_bar_final_string_2"), + _rank, + (server getVariable "hr") toFixed 0, + A3A_faction_reb get "name", + (server getVariable "resourcesFIA") toFixed 0, + (_player getVariable "moneyX") toFixed 0, + _aggrString, + tierWar, + _ucovertxt, + _rallytxt, + A3A_faction_civ get "currencySymbol" + ]; + + _setText ctrlSetStructuredText (parseText format ["%1", _textX]); + _setText ctrlCommit 0; +}; + if (_player != theBoss) then { private _nameC = [ localize "STR_generic_commander_none",