Skip to content

Commit

Permalink
Fixed fetch of variable when recreation is done
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Apr 18, 2024
1 parent b9beed1 commit 0494c69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cScripts/functions/systems/fn_addArsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ private _arsenalStatement = {
private _items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []);
if (_items isEqualTo []) then {
SHOW_WARNING_2("Staging Arsenal", "Whitleist was empty for %1 [%2] attepting to recreate it", player, typeOf player);
_items = call cScripts_fnc_getArsenalWhitelist;
SETVAR(player,EGVAR(Player,ArsenalWhitelist), _items);
private _whitelist = call cScripts_fnc_getArsenalWhitelist;
SETVAR(player,EGVAR(Player,ArsenalWhitelist), _whitelist);
_items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []);
};

INFO_3("Staging Arsenal", "Whitleist containing %1 items added to %2 [%3]", count _items, player, typeOf player);
Expand Down

0 comments on commit 0494c69

Please sign in to comment.