I'm still having issues though. It seems the database won't update the inventory. So each server restart it reverts back to the inventory I placed when first creating the database entry. The RPT log shows it writing an updated inventory when I place/take items:
"HIVE: WRITE: "CHILD:303:61:[""Inventory here""]
But the database doesn't actually update...
dayz_server_config.hpp settings:
Code:
// Enable object publishing check
// CheckObject true - Tents and objects are checked and only published to database if valid classes
// CheckObject false - Object check is disabled and they are always published
#define CheckObject false
Snippet from server_updateObject.sqf
Code:
_object_inventory = {
private["_inventory","_previous","_key"];
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];
_previous = str(_object getVariable["lastInventory",[]]);
if (str(_inventory) != _previous) then {
_object setVariable["lastInventory",_inventory];
if (_objectID == "0") then {
_key = format["CHILD:309:%1:%2:",_uid,_inventory];
} else {
_key = format["CHILD:303:%1:%2:",_objectID,_inventory];
};
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_key call server_hiveWrite;
};
};
At the end there I see "_key = format["CHILD:303:%1:%2:",_objectID,_inventory];"
And what the RPT log shows seems to skip %2 which is unique_ID from what I can understand from the code " diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);"
Can anyone tell my why? The tutorial told to "give random ass ID", but is there any parameters it needs to follow? A certain number of numbers ect?
I just pictched a tent and the RPT log shows ""HIVE: WRITE: "CHILD:309:291441286010219:[[[],[]],[["ItemBloodbag"],[1]],[[],[]]]:"""
There is clearly something wrong with the way the hive tries to write to crates to the ammobox.
Help?