From 6d1d4c998aa8cb9ca9d8fe5bc34b1a054ea93364 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 31 Jul 2014 14:00:50 -0400 Subject: [PATCH] Change count back to forEach Can not nest count loops inside other count loops: https://community.bistudio.com/wiki/Code_Optimisation#forEach_vs_count --- SQF/dayz_server/init/server_functions.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 382ee8909..e86ec45a2 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -863,7 +863,7 @@ server_spawnCleanLoot = { }; }; sleep 0.001; - } count _missionObjs; + } forEach _missionObjs; if (_delQty > 0) then { _qty = count _missionObjs; diag_log (format["CLEANUP: Deleted %1 Loot Piles out of %2",_delQty,_qty]); @@ -894,7 +894,7 @@ server_spawnCleanAnimals = { }; }; sleep 0.001; - } count _missonAnimals; + } forEach _missonAnimals; if (_delQtyAnimal > 0) then { _qty = count _missonAnimals; diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);