kano5003 Posted July 31, 2014 Report Share Posted July 31, 2014 Hey Guys, Im having trouble getting WAI to work on my Linux server as when I complete the mission it tries to save the vehicle to the hive thus creating this error message - server_hiveReadWriteLar> 1:42:59 Error Undefined variable in expression: _resultarray 1:42:59 File z\addons\dayz_server\init\server_functions.sqf, line 171 1:42:59 Error in expression <y call server_hiveReadWrite; _outcome = _result select 0; if (_outcome == "PASS"> 1:42:59 Error position: <_result select 0; if (_outcome == "PASS"> 1:42:59 Error Undefined variable in expression: _result 1:42:59 File z\addons\dayz_server\WAI\missions\compile\custom_publishVehicle.sqf, line 80 To my understanding its trying to read a .dll file but obviously its a Linux server. Any help would be greatly appreciated. Thanks KaNo5003. Link to comment Share on other sites More sharing options...
DeanReid Posted July 31, 2014 Report Share Posted July 31, 2014 in the publish vehicle file line 54 just comment out the line _key call server_hiveWrite; Link to comment Share on other sites More sharing options...
kano5003 Posted July 31, 2014 Author Report Share Posted July 31, 2014 Quote in the publish vehicle file line 54 just comment out the line Same Error :( server_hiveReadWriteLar> 7:08:46 Error Undefined variable in expression: _resultarray 7:08:46 File z\addons\dayz_server\init\server_functions.sqf, line 171 7:08:46 Error in expression <y call server_hiveReadWrite; _outcome = _result select 0; if (_outcome == "PASS"> 7:08:46 Error position: <_result select 0; if (_outcome == "PASS"> 7:08:46 Error Undefined variable in expression: _result 7:08:46 File z\addons\dayz_server\WAI\missions\compile\custom_publishVehicle.sqf, line 80 Thanks for helping Any more tips? Link to comment Share on other sites More sharing options...
DeanReid Posted July 31, 2014 Report Share Posted July 31, 2014 Send your file please, paste in [Code][/Code] Tags Link to comment Share on other sites More sharing options...
DeanReid Posted August 5, 2014 Report Share Posted August 5, 2014 try this instead, there was 2 hives to remove private ["_object","_worldspace","_location","_dir","_class","_uid","_dam","_hitpoints","_selection","_array","_damage","_fuel","_key","_totaldam","_spawnDMG","_characterID"]; //[_veh,[_dir,_location],"V3S_Civ",true] _object = _this select 0; _worldspace = _this select 1; _class = _this select 2; _spawnDMG = _this select 3; _characterID = _this select 4; _fuel = 1; _damage = 0; _array = []; diag_log ("PUBLISH: Attempt " + str(_object)); _dir = _worldspace select 0; _location = _worldspace select 1; //Generate UID test using time // _uid = str( round (dateToNumber date)) + str(round time); _uid = _worldspace call dayz_objectUID2; //_uid = format["%1%2",(round time),_uid]; if (_spawnDMG) then { _fuel = 0; if (getNumber(configFile >> "CfgVehicles" >> _class >> "isBicycle") != 1) then { // Create randomly damaged parts _totaldam = 0; _hitpoints = _object call vehicle_getHitpoints; { // generate damage on all parts _dam = call generate_new_damage; _selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name"); if (_dam > 0) then { _array set [count _array,[_selection,_dam]]; _totaldam = _totaldam + _dam; }; } forEach _hitpoints; // just set low base dmg - may change later _damage = 0; _fuel = wai_mission_fuel; }; }; // TODO: check if uid already exists and if so increment by 1 and check again as soon as we find nothing continue. //Send request _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, [], _array, _fuel,_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); //_key call server_hiveWrite; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object]; // Switched to spawn so we can wait a bit for the ID [_object,_uid,_fuel,_damage,_array,_characterID,_class] spawn { private["_object","_uid","_fuel","_damage","_array","_characterID","_done","_retry","_key","_result","_outcome","_oid","_selection","_dam","_class"]; _object = _this select 0; _uid = _this select 1; _fuel = _this select 2; _damage = _this select 3; _array = _this select 4; _characterID = _this select 5; _class = _this select 6; _done = false; _retry = 0; // TODO: Needs major overhaul while {_retry < 10} do { sleep 1; // GET DB ID _key = format["CHILD:388:%1:",_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); //_result = _key call server_hiveReadWrite; _outcome = _result select 0; if (_outcome == "PASS") then { _oid = _result select 1; _object setVariable ["ObjectID", _oid, true]; diag_log("CUSTOM: Selected " + str(_oid)); _done = true; _retry = 100; } else { diag_log("CUSTOM: trying again to get id for: " + str(_uid)); _done = false; _retry = _retry + 1; }; }; if(!_done) exitWith { deleteVehicle _object; diag_log("CUSTOM: failed to get id for : " + str(_uid)); }; _object setVariable ["lastUpdate",time]; _object setVariable ["CharacterID", _characterID, true]; _object setDamage _damage; // Set Hits after ObjectID is set { _selection = _x select 0; _dam = _x select 1; if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8}; [_object,_selection,_dam] call object_setFixServer; } forEach _array; _object setFuel _fuel; _object setvelocity [0,0,1]; _object call fnc_veh_ResetEH; // testing - should make sure everyone has eventhandlers for vehicles was unused... PVDZE_veh_Init = _object; publicVariable "PVDZE_veh_Init"; diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid)); }; Link to comment Share on other sites More sharing options...
kano5003 Posted August 8, 2014 Author Report Share Posted August 8, 2014 Thanks for this Dean, Is their anyway I can get a message to pop up as soon as they get into the vehicle saying this will not stay upon server restart? Thanks KaNo5003. Link to comment Share on other sites More sharing options...
DeanReid Posted August 8, 2014 Report Share Posted August 8, 2014 there is already something in the config I believe or that could be DZMS but you could do something like this just copied it from dzms so probably won't work, not got time to thoroughly look if (!isServer) exitWith {}; private ["_mission","_veh"]; _veh = _this select 0; if (count _this == 2) then { _mission = _this select 1; } else { _mission = false; }; waitUntil { count crew _veh > 0}; while {(alive _veh) and ({alive _x} count crew _veh > 0)} do { _veh setVehicleAmmo 1; _veh setFuel 1; if ({alive _x} count crew _veh == 0) then { _veh setDamage 1; _veh setVariable ["killedat", time]; }; if ((_mission) AND (clean_running_mission)) then { _veh setDamage 1; _veh setVariable ["killedat", time]; }; sleep 30; }; _veh setDamage 1; _veh setVariable ["killedat", time]; _object addEventHandler ["GetIn",{ _nil = [nil,(_this select 2),"loc",rTITLETEXT,"Warning: This vehicle will disappear on server restart!","PLAIN DOWN",5] call RE; }]; Replace @WAI\compile\vehicle_monitor.sqf with this keep a backup though Link to comment Share on other sites More sharing options...
kano5003 Posted August 9, 2014 Author Report Share Posted August 9, 2014 Ill give this a shot now. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now