diff --git a/SQF/dayz_code/compile/fn_buildWeightedArray.sqf b/SQF/dayz_code/compile/fn_buildWeightedArray.sqf index d9e9d8d7c..6a190be82 100644 --- a/SQF/dayz_code/compile/fn_buildWeightedArray.sqf +++ b/SQF/dayz_code/compile/fn_buildWeightedArray.sqf @@ -18,9 +18,9 @@ scriptName "Functions\arrays\fn_selectRandomWeighted.sqf"; [*] Algorithm is inefficient? */ -private["_weighted"]; +private["_weights","_weighted","_weight"]; -_array = _this select 0; +// _array = _this select 0; _weights = _this select 1; /* @@ -34,7 +34,6 @@ if ((count _array) > (count _weights)) exitWith {debugLog "Log: [selectRandomWei _weighted = []; for "_i" from 0 to ((count _weights) - 1) do { - private ["_weight"]; _weight = _weights select _i; //Ensure the weight is a Number. @@ -53,4 +52,4 @@ for "_i" from 0 to ((count _weights) - 1) do _weighted set [(count _weighted), _i]; }; }; -_weighted \ No newline at end of file +_weighted