Jump to content
  • 0

Not defined Variable in almost vanilla server_functions.sqf ?!?


larsmos2011

Question

Hello, 

we are fighting against a massive lag on our Private Server. Everything works so slowely. Bought vehicle can be accessed after ca. 5minutes etc. 

 

I noticed an Spam in my RPT :

17:07:58 Error in expression <imit = _random select 1;

_qty = {_x == _vehicle} count serverVehicleCounter;


>
17:07:58   Error position: <_vehicle} count serverVehicleCounter;


>
17:07:58   Error Not defined variable in expression: _vehicle
17:07:58 File z\addons\dayz_server\init\server_functions.sqf, line 261

So when I launched my Server without a custom missionfile it was fine. So it must be a mod on our Server. 

 

 

In our missionfile there is :

-Right Click Actions

-SelfBB, TOW/Lift , Suicide, Change Viewdistance, Knockout, Masterkey Chopper Evac

-Infomenu

-Help Menu

-Bunker Script

-Auto Refuel

-Refuel Station

-EVR Blowouts

-Only open churches

-And some self written scripts i dont want to share (they have nothing to do with vehicles. They also dont use the server.pbo)

installed.

 

The Server.pbo is almost vanilla ; added custom buildings, DZAI, WAI and infiSTAR's antihack. 

 

As I said, when the missionfile is vanilla , all is okay. 

I hope someone can help me, Dont want to do a completly new MF. 

 

PS : The variable "_vehicle" is also used in some of the scripts. maybe its because of this ?

 

Regards,

Larsmos2011

 

 

Edit got it working by changing this

server_functions.sqf, arround line 253

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;

to this

if (!isDedicated) exitWith { }; //Be sure the run this
		_index = floor random count AllowedVehiclesList;
		_random = AllowedVehiclesList select _index;

		_vehicle = _random select 0;
		_velimit = _random select 1;
	while {count AllowedVehiclesList > 0} do {
Edited by larsmos2011
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

yes.

because your error should come from this:

 

in your mission.pbo, in the init:

you have this:

 

MaxVehicleLimit = xxx; // Default = 50

 

in your server.pbo, in the dynamic vehicles.sqf

you have added more vehicles I guess.

 

problem is: the numbers aren't correct. you may have more vehicles in the .sqf as allowed in your init.

 

thats causing your error I think.

 

check this out and then look, if the error is gone.

Link to comment
Share on other sites

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...