Skip to content

Commit

Permalink
Updated logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Aug 16, 2023
1 parent 2e4c0b0 commit d4ed328
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cScripts/functions/players/fn_setActiveRadio.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ if (EGVAR(patches,usesTFAR)) exitWith {
}, [_radio], 1] call CBA_fnc_waitAndExecute;
};

SHOW_CHAT_ERROR("RadioSetActive", "Fatal");
SHOW_CHAT_ERROR("RadioSetActive", "Fatal");
7 changes: 4 additions & 3 deletions cScripts/functions/players/fn_setRadioChannel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (!GVAR(isPlayer)) exitWith {};

// ACRE
if (EGVAR(patches,usesACRE)) exitWith {
_player setVariable [QEGVAR(Player,RadioChannel), []];
SETVAR(_player, QEGVAR(Player,RadioChannel), []);
private _playerRadios = [_player] call acre_api_fnc_getCurrentRadioList;
{
if !(_x == "") then {
Expand All @@ -37,7 +37,8 @@ if (EGVAR(patches,usesACRE)) exitWith {
// Store radio channels in variable.
private _radioAndChannel = _player getVariable [QEGVAR(Player,RadioChannel), []];
_radioAndChannel pushBack [[_x] call acre_api_fnc_getBaseRadio, _channel];
_player setVariable [QEGVAR(Player,RadioChannel), _radioAndChannel];
SETVAR(_player, QEGVAR(Player,RadioChannel), _radioAndChannel);

} else {
SHOW_SERVER_WARNING_1("Radio", "Empty radio is trying to get it's channel applied for %1", _player);
};
Expand All @@ -50,4 +51,4 @@ if (EGVAR(patches,usesTFAR)) exitWith {
/** TODO: Code goes here */
};

SHOW_CHAT_ERROR("Radio", "Fatal");
SHOW_CHAT_ERROR("Radio", "Fatal");

0 comments on commit d4ed328

Please sign in to comment.