Skip to content

Commit

Permalink
Change isNil check
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenceIsFatto committed Aug 9, 2024
1 parent 20e86be commit 80a49be
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions A3A/addons/core/functions/Base/fn_statistics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -65,6 +63,25 @@ switch (gameMode) do {

_aggrString = _aggrString + _rivalsActivityTxt;

if (isNil "theBoss") exitWith {
_textX = format [
"<t size='0.67' shadow='2'>" + (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",
Expand Down

0 comments on commit 80a49be

Please sign in to comment.