HellWalker Posted June 29, 2014 Report Share Posted June 29, 2014 Hey guys, I'm running DayZ Overpoch 1.0.5.1 amd i'm get some errors, i already tried to find them in google or in this forum, but no success.... Can anyone help me? This is waht shows in my rpt log 9:45:45 Error in expression <Dedicated) exitWith { }; while {count AllowedVehiclesList > 0} do { _index = > 9:45:45 Error position: <AllowedVehiclesList > 0} do { _index = > 9:45:45 Error Undefined variable in expression: allowedvehicleslist 9:45:45 File z\addons\dayz_server\init\server_functions.sqf, line 240 9:45:45 Error in expression <esList resize _lastIndex; }; if (count AllowedVehiclesList == 0) then { diag_lo> 9:45:45 Error position: <AllowedVehiclesList == 0) then { diag_lo> 9:45:45 Error Undefined variable in expression: allowedvehicleslist 9:45:45 File z\addons\dayz_server\init\server_functions.sqf, line 262 And this is the file it refer to line237 spawn_vehicles = { private ["_random","_lastIndex","_weights","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"]; line240 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; line262 }; if (count AllowedVehiclesList == 0) then { diag_log("DEBUG: unable to find suitable vehicle to spawn"); } else { // add vehicle to counter for next pass serverVehicleCounter set [count serverVehicleCounter,_vehicle]; // Find Vehicle Type to better control spawns _isAir = _vehicle isKindOf "Air"; _isShip = _vehicle isKindOf "Ship"; if(_isShip || _isAir) then { if(_isShip) then { // Spawn anywhere on coast on water waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [MarkerPosition,0,DynamicVehicleArea,10,1,2000,1] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning boat near coast " + str(_position)); } else { // Spawn air anywhere that is flat waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [MarkerPosition,0,DynamicVehicleArea,10,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning air anywhere flat " + str(_position)); }; } else { // Spawn around buildings && 50% near roads if((random 1) > 0.5) then { waitUntil{!isNil "BIS_fnc_selectRandom"}; _position = RoadList call BIS_fnc_selectRandom; _position = _position modelToWorld [0,0,0]; waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [_position,0,10,10,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning near road " + str(_position)); } else { waitUntil{!isNil "BIS_fnc_selectRandom"}; _position = BuildingList call BIS_fnc_selectRandom; _position = _position modelToWorld [0,0,0]; waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [_position,0,40,5,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning around buildings " + str(_position)); }; }; // only proceed if two params otherwise BIS_fnc_findSafePos failed && may spawn in air if ((count _position) == 2) then { _dir = round(random 180); _istoomany = _position nearObjects ["AllVehicles",50]; if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many vehicles at " + str(_position)); }; //place vehicle _veh = createVehicle [_vehicle, _position, [], 0, "CAN_COLLIDE"]; _veh setdir _dir; _veh setpos _position; if(DZEdebug) then { _marker = createMarker [str(_position) , _position]; _marker setMarkerShape "ICON"; _marker setMarkerType "DOT"; _marker setMarkerText _vehicle; }; // Get position with ground _objPosition = getPosATL _veh; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; // _veh setVehicleAmmo DZE_vehicleAmmo; // Add 0-3 loots to vehicle using random cfgloots _num = floor(random 4); _allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"]; for "_x" from 1 to _num do { _iClass = _allCfgLoots call BIS_fnc_selectRandom; _itemTypes = []; if (DZE_MissionLootTable) then{ { _itemTypes set[count _itemTypes, _x select 0] } count getArray(missionConfigFile >> "cfgLoot" >> _iClass); } else { { _itemTypes set[count _itemTypes, _x select 0] } count getArray(configFile >> "cfgLoot" >> _iClass); }; _index = dayz_CLBase find _iClass; _weights = dayz_CLChances select _index; _cntWeights = count _weights; _index = floor(random _cntWeights); _index = _weights select _index; _itemType = _itemTypes select _index; _veh addMagazineCargoGlobal [_itemType,1]; //diag_log("DEBUG: spawed loot inside vehicle " + str(_itemType)); }; [_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh; }; }; }; I'm not that advanced in scripting, of course, so maybe you guys can help me with that! Thanks! Link to comment Share on other sites More sharing options...
0 vbawol Posted June 29, 2014 Report Share Posted June 29, 2014 Error Undefined variable in expression: allowedvehicleslist means that the array allowedvehicleslist in dynamic_vehicle.sqf is not being loaded from the server files. Check that your mission file is loading dynamic_vehicle.sqf. Link to comment Share on other sites More sharing options...
0 calamity Posted July 28, 2014 Report Share Posted July 28, 2014 Hey guys, I'm running DayZ Overpoch 1.0.5.1 amd i'm get some errors, i already tried to find them in google or in this forum, but no success.... Can anyone help me? This is waht shows in my rpt log 9:45:45 Error in expression <Dedicated) exitWith { }; while {count AllowedVehiclesList > 0} do { _index = > 9:45:45 Error position: <AllowedVehiclesList > 0} do { _index = > 9:45:45 Error Undefined variable in expression: allowedvehicleslist 9:45:45 File z\addons\dayz_server\init\server_functions.sqf, line 240 9:45:45 Error in expression <esList resize _lastIndex; }; if (count AllowedVehiclesList == 0) then { diag_lo> 9:45:45 Error position: <AllowedVehiclesList == 0) then { diag_lo> 9:45:45 Error Undefined variable in expression: allowedvehicleslist 9:45:45 File z\addons\dayz_server\init\server_functions.sqf, line 262 And this is the file it refer to line237 spawn_vehicles = { private ["_random","_lastIndex","_weights","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"]; line240 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; line262 }; if (count AllowedVehiclesList == 0) then { diag_log("DEBUG: unable to find suitable vehicle to spawn"); } else { // add vehicle to counter for next pass serverVehicleCounter set [count serverVehicleCounter,_vehicle]; // Find Vehicle Type to better control spawns _isAir = _vehicle isKindOf "Air"; _isShip = _vehicle isKindOf "Ship"; if(_isShip || _isAir) then { if(_isShip) then { // Spawn anywhere on coast on water waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [MarkerPosition,0,DynamicVehicleArea,10,1,2000,1] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning boat near coast " + str(_position)); } else { // Spawn air anywhere that is flat waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [MarkerPosition,0,DynamicVehicleArea,10,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning air anywhere flat " + str(_position)); }; } else { // Spawn around buildings && 50% near roads if((random 1) > 0.5) then { waitUntil{!isNil "BIS_fnc_selectRandom"}; _position = RoadList call BIS_fnc_selectRandom; _position = _position modelToWorld [0,0,0]; waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [_position,0,10,10,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning near road " + str(_position)); } else { waitUntil{!isNil "BIS_fnc_selectRandom"}; _position = BuildingList call BIS_fnc_selectRandom; _position = _position modelToWorld [0,0,0]; waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [_position,0,40,5,0,2000,0] call BIS_fnc_findSafePos; //diag_log("DEBUG: spawning around buildings " + str(_position)); }; }; // only proceed if two params otherwise BIS_fnc_findSafePos failed && may spawn in air if ((count _position) == 2) then { _dir = round(random 180); _istoomany = _position nearObjects ["AllVehicles",50]; if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many vehicles at " + str(_position)); }; //place vehicle _veh = createVehicle [_vehicle, _position, [], 0, "CAN_COLLIDE"]; _veh setdir _dir; _veh setpos _position; if(DZEdebug) then { _marker = createMarker [str(_position) , _position]; _marker setMarkerShape "ICON"; _marker setMarkerType "DOT"; _marker setMarkerText _vehicle; }; // Get position with ground _objPosition = getPosATL _veh; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; // _veh setVehicleAmmo DZE_vehicleAmmo; // Add 0-3 loots to vehicle using random cfgloots _num = floor(random 4); _allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"]; for "_x" from 1 to _num do { _iClass = _allCfgLoots call BIS_fnc_selectRandom; _itemTypes = []; if (DZE_MissionLootTable) then{ { _itemTypes set[count _itemTypes, _x select 0] } count getArray(missionConfigFile >> "cfgLoot" >> _iClass); } else { { _itemTypes set[count _itemTypes, _x select 0] } count getArray(configFile >> "cfgLoot" >> _iClass); }; _index = dayz_CLBase find _iClass; _weights = dayz_CLChances select _index; _cntWeights = count _weights; _index = floor(random _cntWeights); _index = _weights select _index; _itemType = _itemTypes select _index; _veh addMagazineCargoGlobal [_itemType,1]; //diag_log("DEBUG: spawed loot inside vehicle " + str(_itemType)); }; [_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh; }; }; }; I'm not that advanced in scripting, of course, so maybe you guys can help me with that! Thanks! did you ever fix this problem ?? I am getting same error in rpt file for my newest overpoch tavi server with vilayer my init... if (isServer) then { call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_13.Tavi\dynamic_vehicle.sqf"; //Compile vehicle configs Link to comment Share on other sites More sharing options...
0 redcloud78 Posted July 28, 2014 Report Share Posted July 28, 2014 was something about the //Controls the max overall vehicle limit if this limit is reached no new vehicles will spawn. MaxVehicleLimit = 152; being too little or too much Link to comment Share on other sites More sharing options...
0 Brockie Posted July 29, 2014 Report Share Posted July 29, 2014 I made a couple typos with commas when I edited my dynamic_vehicles.sqf and it was giving me this error presumably because it couldn't load the file. It's worth having another look at dynamic_vehicles.sqf if you have edited it recently (ie. rebuilding a server). Link to comment Share on other sites More sharing options...
Question
HellWalker
Hey guys,
I'm running DayZ Overpoch 1.0.5.1 amd i'm get some errors, i already tried to find them in google or in this forum, but no success....
Can anyone help me?
This is waht shows in my rpt log
And this is the file it refer to
I'm not that advanced in scripting, of course, so maybe you guys can help me with that!
Thanks!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now