Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed Feb 15, 2024
1 parent ca5a71f commit 904cd91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core.liberation/scripts/shared/functions/F_UnitAddAmmo.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
params ["_unit", "_item", "_max"];

private _ret = 0;
if (_item == "") exitWith { _ret };

if ( isClass (configFile >> "CfgWeapons" >> _item) && count (getArray (configFile >> "CfgWeapons" >> _item >> "magazines")) > 0 ) then {
private _magType = getArray (configFile >> "CfgWeapons" >> _item >> "magazines") select 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
params ["_unit", "_item", "_min"];

private _ret = false;
if (_item == "") exitWith { _ret };

if ( isClass (configFile >> "CfgWeapons" >> _item) && count (getArray (configFile >> "CfgWeapons" >> _item >> "magazines")) > 0 ) then {
private _magType = getArray (configFile >> "CfgWeapons" >> _item >> "magazines") select 0;
Expand Down

0 comments on commit 904cd91

Please sign in to comment.