Jump to content
  • 0

rpt spam with vehicle count


KillKillKill

Question

Hi all.

 

I am getting megs of spam with this:

 

--------------------------------------------

23:08:42   Error position: <_vehicle} count serverVehicleCounter;
 
 
>
23:08:42   Error Undefined variable in expression: _vehicle
23:08:42 File z\addons\dayz_server\init\server_functions.sqf, line 251
23:08:42 Error in expression <imit = _random select 1;
 
_qty = {_x == _vehicle} count serverVehicleCounter;
-----------------------------------------------------
 
Line 251 in the server_functions is:
 
--------
_velimit = _random select 1;
-----------------------------------------------------
 
What number should this be at? The code block is this:
-------------------------------------------------------------------------------------
spawn_vehicles = {
private ["_random","_lastIndex","_weights","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"];
 
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 {};
 
---------------------------------------------------------------------
 
 
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...