diff --git a/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf b/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf index b5ba8ee66e..68f20b011c 100644 --- a/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf +++ b/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf @@ -100,11 +100,14 @@ private _cfgVehicles = configFile >> "CfgVehicles"; { // Magazines in weapons have 2 entries: Name and ammo count if (_forEachIndex in [4, 5]) then { - _x params ["_magazine"]; - _uniqueBaseCfgText = (getText (_cfgMagazines >> _magazine >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + _x params [["_magazine", ""], "_count"]; - if (_uniqueBaseCfgText != "") then { - _weaponsInfo set [_forEachIndex, _uniqueBaseCfgText]; + if (_magazine != "") then { + _uniqueBaseCfgText = (getText (_cfgMagazines >> _magazine >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + + if (_uniqueBaseCfgText != "") then { + _weaponsInfo set [_forEachIndex, [_uniqueBaseCfgText, _count]]; + }; }; } else { // Other