database call base building mod revisit ..

Tai

Member
Hay all, re-visiting this problem I have to see if some one new can point me in the right direction as the code I have the moment does not seem to work and I cant seem to figure out why.

The part bellow to look at is the SQL, which essentially joins along all players survivor id's so that all base buildings they have made over all their lives gets set to the ID of their current survivor.

Now if I insert the sql manually via the database it works a treat, but what I am trying to do is get it to insert via a server restart so that we dont have to keep going into the database, so its done any time the server restarts.

Sadly I cant get this to work, and since I know the 999 call method works, and my sql is good I must be missing something else, thanks for any help.

Code:
if (isServer) then {
//try inserting the sql at this point.
 
_key = format["CHILD:999:UPDATE instance_deployable d LEFT JOIN (SELECT DISTINCT d.owner_id, s.unique_id FROM instance_deployable d LEFT JOIN survivor s ON s.id = d.owner_id WHERE s.is_dead =1 ) AS dead ON dead.owner_id = d.owner_id LEFT JOIN survivor live ON live.unique_id = dead.unique_id SET d.owner_id = live.id WHERE live.is_dead =0", dayZ_instance];
_data = "HiveEXT" callExtension _key;
diag_log("SERVER: Updated Build ID's...");
 
 
_serverMonitor =[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
dogOwner = [];
axe_server_lampObjs =    compile preprocessFileLineNumbers "lights\fnc_returnLampWS.sqf";
    "axeLampObjects" addPublicVariableEventHandler {_id = (_this select 1) spawn axe_server_lampObjs};
 
};
 
Back
Top