Bliss:Saving Newly Created Vehicles to the DB, almost

Yeeees, I got it working, with a fair bit of Help from Xyberviri, big thanks m8..

Though I may have to work on the positions, not so sure how safe the positions are with BIS_fnc_findSafePos ;)

huey_spawn.jpg
 
Dude im so sorry i got home after dinner and just knocked out until a little while ago, i just need to wait tilll tje wife gets off the pc here in a bit and then i can help out, the issue is you need to get rid of the server_savevehicle and put "dayzsavevehicle = _veh;" and then call "publicvarible "dayzsavevehicle";" which will make the server execute server_savevehicle on the server side on what ever vehicle is in dayzsavevehicle varible
Hi dude, love your method.
First of all, its not even saving, and i get this:
17:27:55 "Deleting object AN2_DZ with invalid ID at pos [7014.38,1300.18,0.0166664]"
Any ideas?
I will try the save vehicle method you replyed to the other guy with, and see if its saving.. but right now its deleting it too D:
 
Also, is this right?

dayzsavevehicle = _veh;
publicvariable "dayzSaveVehicle";

"dayzSaveVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_saveVehicle}; //This is a event handler to call this function from client side
UPDATE: Now its only deleting the object... Im using same spawn script as the guy 2 post before me.
 
Also, i really like this script, its very good if you dont wanna do the sqf to sqm show and all that.
 
Assigning and calling the public variable is correct, that should save the vehicle to the database, check your .rpt file for xsave entries. If none are there make sure you have the additions in the server files.

To stop your vehicels being deleted ingame you need to edit out the code that deletes any new vehicles from server_cleanup.fsm in dayz_server\system. Look for class check_for_hacker and comment out like this
Code:
    class check_for_hacker
    {
      name = "check_for_hacker";
      init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
      " {" \n
      "//    if(vehicle _x != _x) then {" \n
      "//        if  (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"")) then {" \n
      "//            diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
      "//            (vehicle _x) setDamage 1;" \n
      "//            _x setDamage 1;" \n
      "//        };" \n
      "//    };" \n
      " } forEach allUnits;" \n

I allow the loop to carry on as since 1.7.5.1 commenting out any more seems to break it entirely..

A more elegant solution may be to assign a variable to any vehicles we create this way and filter them out in the .fsm code..
 
Thanks, will try out later!
EDIT: I didnt put it as loop, but i did infact comment (all) of it.
 
Code:
       "" \n
       "//Check for hackers" \n
       "// {" \n
       "//if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "//diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
       "//  (vehicle _x) setDamage 1;" \n
       "//  _x setDamage 1;" \n
       "//};" \n
       "// } forEach allUnits;" \n
       "" \n

Thats what i got, no class_hackers or whatever.
 
Did it work ? I used to have the same but found it caused my server to not start (since 1.7.5). Is why I changed it so the forEach AllUnits loop still works, just commented out the 'innards', seemed to work for me.. I can't see what difference it would make, may have been coincidence..

That looks different from what I have, what version of dayZ are you running ?
 
That will explain the difference, have you tried commenting just the bits inside the loop, caused my server to not start when I commented it out like yours.

Unpack your mod and, using something like notepad++, do a search in files for the text 'Deleting object' that appears in the .rpt file. Maybe Fallujah mod handles it elsewhere, also get into the vehicle if you can, should kill you and add something like killing hacker to .rpt file, something else to search for..

You want to find the bit that adds the text to the .rpt file and work back from there..
 
So, this is not going goood.. at all..

CLEANUP.FSM
Code:
      "} forEach allGroups;" \n
      "" \n
      "Check for hackers" \n
      " {" \n
      "//    if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
      "//        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
      "//          (vehicle _x) setDamage 1;" \n
      "//          _x setDamage 1;" \n
      "//    };" \n
      " } forEach allUnits;" \n
      "" \n

ERROR ON SCRIPT:
Code:
16:39:15 Error in expression <oup _x;
 
};
} forEach allGroups;
 
Check for hackers
{
 
 
 
 
 
} forEach allUnits;
 
>
16:39:15  Error position: <for hackers
{
 
 
 
 
 
} forEach allUnits;
 
>
16:39:15  Error Missing ;
 
i got it more easily working by using server events + dayz hive write 308
in init
PHP:
"addVehicle" addPublicVariableEventHandler
  {
    private ["_player","_dir","_class","_position","_param"];
    _param = _this select 1;
    _player = _param select 0;
    _class = _param select 1;
    _position = getPosATL _player;
    _charID =    _player getVariable ["characterID","0"];
   
    _worldspace = [
            _dir,
            _position
        ];
    //diag_log ("PUBLISH: Attempt " + str(_object));
    _dir =        _worldspace select 0;
    _location = _worldspace select 1;
 
    _object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
    _object setdir _dir;
    _object setpos _location;
    _object setVariable ["OwnerID", _charID, true];
 
    //add to database
    dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
 
    //get UID
    _uid = _object call dayz_objectUID;
 
    //Send request
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
 
    _object setVariable ["ObjectUID", _uid, true];
 
    diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
 
 
   
  };

to run it im using something like that :
PHP:
private ["_class"];
args = _this select 3;
veh = args select 0;
vehlist = ["USEC_Maule_M7_STD","USEC_Maule_M7_SKI","DZP_MH6J","HMMWV"]
addVehicle = [player,vehlist [veh]]; publicVariableServer "addVehicle"; //
 
Saving vehicles crashes my server. The arma.exe simply crashes....
Last line recorded on the log file was:
Code:
2013-03-07 17:53:35 HiveExt: [Information] Method: 999 Params: INSERT INTO `instance_vehicle`(`world_vehicle_id`,`last_updated`, `created`,`instance_id`) VALUES ('?','CURRENT_TIMESTAMP','CURRENT_TIMESTAMP','1'):[72]:

Sometimes this happens right when i spawn a vehicle...and sometimes when i spawn a second vehicle. (the 1st gets saved)

Any ideas ?? I am using dayzCC server (1.7.6.1)
-Thanks
 
That hiveext log looks fine, what's in your .rpt log ? Takes some doing to crash the server out like that, tho have done it :)

Is dayzCC using reality or their own customised version of bliss for 1.7.6.x ?
 
The .rpt (which i forgot it ever existed :p) shows this:

Mods: Expansion\beta
Distribution: 0
Version 1.62.101480
Fault address: 6E34C778 01:0001B778 F:\ArmA 2\DatabaseMySql.dll
file: dayz_1 (__cur_mp)
world: chernarus
Prev. code bytes: CC CC CC CC CC CC CC CC 53 56 8B 74 24 0C 33 DB
Fault code bytes: 39 5E 0C 0F 85 83 00 00 00 57 38 5E 50 75 4B 8B

Registers:
EAX:00000001 EBX:00000000
ECX:00000000 EDX:0B237AB0
ESI:00000000 EDI:00000001
CS:EIP:0023:6E34C778
SS:ESP:002B:0156C3F4 EBP:0156C4F0
DS:002B ES:002B FS:0053 GS:002B
Flags:00010246

which is exactly what i saw from Event Logger in windows.

I am using their own version of bliss.
 
Hi all,
I wonder if you have come across this issue with the cleanup.fsm.

Im having the problem that when i edit the CLEANUP.FSM as per axeman and restart the server it hangs on requesting authentication.

(Im trying to get ai planes to fly across the map.
In the editor preview it works and on the server the planes explode straight away.)
 
Back
Top