Jump to content
  • 0

Can anyone figure out what the problem is with this?


ZarX

Question

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.
 
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Yeah Greatboi I do, but the bike is in the allowedvehicle list.. Insert that is where line 263 points to in my server functions.

while {count AllowedVehiclesList > 0} do {

and

if (count AllowedVehiclesList == 0) then {

aren't the same lines of code.

 

The code area you posted doesn't match the error.

Link to comment
Share on other sites

  • 0

1) open dynamic_vehicles in your server.pbo -> make sure all but the last line have a: ,

If all have and are correct then;

 

2) increase all dynamic_vehicles by 1 or 2 each in dynamic_vehicles in your servers.pbo then open init.sqf in your mission.pbo increase max vehicles by 50 - 100

 

Your issue should be resolved.

 

Pry

 

EDIT: I had the exact same report in my RPT on 2 separate servers, 1 was because I had missed out an , in the middle of the list and the 2nd was because i needed increase the vehicle amount in the dynamic vehicle list as not enough were available to spawn.

Link to comment
Share on other sites

  • 0

Lower the settings in your init.sqf. Set MaxVehicleLimit to around 300-400, that should remove the problem.

 

off topic, but why does your cherno server have 49 players and panthera 1? just dont anwser it. i am just playing

Link to comment
Share on other sites

  • 0

off topic, but why does your cherno server have 49 players and panthera 1? just dont anwser it. i am just playing

I don't know. People flock to servers with more than 25 players on them I suppose. My napf server is more active but I have not gotten around to changing the signature. Also, I don't know if you're making fun of me or not.

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