You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the function the variable _max need to be replaced with _min. I think this may havbe resulted from a copy/paste error with CBA_fnc_findMax. Simple fix.
I've highlighted in the current function the issues:
include "script_component.hpp"
SCRIPT(findMin);
private ["_index"];
if (!IS_ARRAY(_this)) exitWith {nil};
if (_this isEqualTo []) exitWith {nil};
In the function the variable _max need to be replaced with _min. I think this may havbe resulted from a copy/paste error with CBA_fnc_findMax. Simple fix.
I've highlighted in the current function the issues:
include "script_component.hpp"
SCRIPT(findMin);
private ["_index"];
if (!IS_ARRAY(_this)) exitWith {nil};
if (_this isEqualTo []) exitWith {nil};
params ["_min"];
_index = 0;
{
if (isNil "_x" || {(typeName _x) != (typeName 0)}) exitWith {_max = nil; _index = nil;};
if (_min > _x) then {_min = _x; _index = _forEachIndex};
} forEach _this;
if (isNil "_max") exitWith {nil};
[_min, _index] // Return
The text was updated successfully, but these errors were encountered: