From 445556ff12ffc0a7e110c5a2233dd00ed31e6bc8 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 31 Jul 2014 13:41:02 -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_code/compile/local_lights_init.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQF/dayz_code/compile/local_lights_init.sqf b/SQF/dayz_code/compile/local_lights_init.sqf index 53e3a263f..424b146c0 100644 --- a/SQF/dayz_code/compile/local_lights_init.sqf +++ b/SQF/dayz_code/compile/local_lights_init.sqf @@ -137,7 +137,7 @@ if(isServer)then{ }; }; sleep 0.001; - } count _missonLights; + } forEach _missonLights; if (_delQtyLights > 0) then { _qty = count _missonLights; diag_log (format["CLEANUP: Deleted %1 Lights out of %2",_delQtyLights,_qty]);