mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Change count back to forEach
You can not nest count loops inside other count loops: https://community.bistudio.com/wiki/Code_Optimisation#forEach_vs_count
This commit is contained in:
@@ -66,7 +66,7 @@ switch _option do {
|
|||||||
_countIn = _x select 1;
|
_countIn = _x select 1;
|
||||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||||
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||||
} count _requirements;
|
} forEach _requirements;
|
||||||
|
|
||||||
if (_proceed) then {
|
if (_proceed) then {
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
|
|||||||
Reference in New Issue
Block a user