My Rpt is spamming this the hole time whats the problem?
Errors
18:06:15 Error Undefined variable in expression: _vehicle 18:06:15 File z\addons\dayz_server\init\server_functions.sqf, line 250 18:06:15 Error in expression <imit = _random select 1; _qty = {_x == _vehicle} count serverVehicleCounter;
Server_functions.sqf
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;
};
Question
zeppo
My Rpt is spamming this the hole time whats the problem?
Errors
18:06:15 Error Undefined variable in expression: _vehicle
18:06:15 File z\addons\dayz_server\init\server_functions.sqf, line 250
18:06:15 Error in expression <imit = _random select 1;
_qty = {_x == _vehicle} count serverVehicleCounter;
Server_functions.sqf
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now