Error from RPT.
if (count AllowedVehiclesList == 0) then {
diag_lo>
6:06:07 Error position: <AllowedVehiclesList == 0) then {
diag_lo>
6:06:07 Error Undefined variable in expression: allowedvehicleslist
6:06:07 File z\addons\dayz_server\init\server_functions.sqf, line 263
6:06:07 Error in expression <esList resize _lastIndex;
};
and here is the area it references.
if (!isDedicated) exitWith { }; //Be sure the run this
while {count AllowedVehiclesList > 0} do {
// BIS_fnc_selectRandom replaced because the index may be needed to remove the element
_index = floor random count AllowedVehiclesList;
_random = AllowedVehiclesList select _index;
_vehicle = _random select 0;
_velimit = _random select 1;
_qty = {_x == _vehicle} count serverVehicleCounter;
// If under limit allow to proceed
if (_qty <= _velimit) exitWith {};
// vehicle limit reached, remove vehicle from list
// since elements cannot be removed from an array, overwrite it with the last element && cut the last element of (as long as order is not important)
_lastIndex = (count AllowedVehiclesList) - 1;
if (_lastIndex != _index) then {
AllowedVehiclesList set [_index, AllowedVehiclesList select _lastIndex];
};
AllowedVehiclesList resize _lastIndex;
};
I can't find the issue anywhere. I've looked at it with older files and even fresh files and I can't find the why this error happens.