[Epoch] Adding new function to server_updateObject.sqf (no update information in db)

hekut146

Well-Known Member
Please help, i add new function to server_updateObject.sqf, no saving info to db (update)

Part script:
Code:
PVDZE_veh_Update = [_object,"all2"];
publicVariableServer "PVDZE_veh_Update";

server_updateObject.sqf (case):
Code:
case "all2": {
        call _object_position2;
};

server_updateObject.sqf (function):
Code:
_object_position2 = {
    private["_worldspace","_fuel","_key"];
    _worldspace = _object call serializeExtendedObjectData;
  
    diag_log "_worldspace";
    diag_log _worldspace;
  
    _fuel = 0;
    if (_object isKindOf "AllVehicles") then {
        _fuel = fuel _object;
    };

    diag_log "_fuel";
    diag_log _fuel;
  
    _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
  
    diag_log "_key";
    diag_log _key;
  
    //diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
  
    diag_log "_key";
    diag_log _key;
};

Info generate normal, no save to db, no error in logs (client/server/hive)...
 
Last edited:
i found problem but don't know how to fix, my object have _objectID = 0, and update script don't know where update information, but after restart object have _objectID
 
no-no in db have ObjectID but my fucntion don't load i see this
6:07:15 "_objectID: 0"
and my _key
6:07:15 "_key: CHILD:305:0:[19.7298,"[6554.269531,7262.731445,0.53299]",[1,0,[],[],[]],"76561198049704275",[1,2,[],[],[]]]:0:"
 
Near the top of server_updateobject you should have this:
_objectID = _object getVariable ["ObjectID","0"];
try adding a diag_log below it to see if that is giving out the correct ObjectID
 
Back
Top