diff --git a/addons/frag/functions/fnc_dev_addRound.sqf b/addons/frag/functions/fnc_dev_addRound.sqf index c723f2e760..67ac2c8318 100644 --- a/addons/frag/functions/fnc_dev_addRound.sqf +++ b/addons/frag/functions/fnc_dev_addRound.sqf @@ -33,13 +33,13 @@ if (_isSidePlayer) then { [ { if (isGamePaused) exitWith {}; - params ["_par", "_handle"]; - _par params ["_projectile"]; + params ["_params", "_handle"]; + _params params ["_projectile"]; if (!alive _projectile) exitWith { [_handle] call CBA_fnc_removePerFrameHandler; }; private _projectileArray = GVAR(dev_trackLines) getOrDefault [(getObjectID _projectile), -1]; - if (typeName _projectileArray == "SCALAR") exitWith {}; + if (_projectileArray isEqualType 0) exitWith {}; (_projectileArray#0) pushBack getPosATL _projectile; }, 0, diff --git a/addons/frag/functions/fnc_dev_trackObj.sqf b/addons/frag/functions/fnc_dev_trackObj.sqf index d6334db9ad..ea3aa3146f 100644 --- a/addons/frag/functions/fnc_dev_trackObj.sqf +++ b/addons/frag/functions/fnc_dev_trackObj.sqf @@ -41,14 +41,14 @@ GVAR(dev_trackLines) set [getObjectID _object, [1, [getposATL _object], _colorAr [ { if (isGamePaused) exitWith {}; - params ["_par", "_handle"]; - _par params ["_object"]; + params ["_params", "_handle"]; + _params params ["_object"]; if (!alive _object) exitWith { [_handle] call CBA_fnc_removePerFrameHandler; }; private _arr = GVAR(dev_trackLines) getOrDefault [(getObjectID _object), -1]; - if (typeName _arr isEqualTo "SCALAR") exitWith { + if (_arr isEqualType 0) exitWith { [_handle] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/frag/functions/fnc_initBlackList.sqf b/addons/frag/functions/fnc_initBlackList.sqf index f95cd09ec5..12c510857b 100644 --- a/addons/frag/functions/fnc_initBlackList.sqf +++ b/addons/frag/functions/fnc_initBlackList.sqf @@ -30,11 +30,10 @@ if (count _convArray == 0 ) exitWith { // Add CBA setting blacklist to blacklist and log errors private _errors = 0; -private _items = count _convArray; -for "_i" from 0 to _items - 1 do { - private _ammo = _convArray#_i; - if (typeName _ammo isNotEqualTo "STRING") then { - INFO_1("Improper ammo string at index %1", _i); +forEach { + private _ammo = _x; + if (!(_ammo isEqualType "")) then { + INFO_1("Improper ammo string at index %1", _forEachIndex); INC(_errors); continue; }; @@ -46,6 +45,6 @@ for "_i" from 0 to _items - 1 do { }; GVAR(shouldFragCache) set [_convArray#_i, false]; -}; +} forEach ; -INFO_2("Initialized blacklist. Total items found: %1, number of items failed: %2", _items, _errors); +INFO_2("Initialized blacklist. Total items found: %1, number of items failed: %2", count _convArray, _errors);