Since the SteamID update i had to resolve to Arma2Net and redo all server_publish, and server_swapObject functions with it...in order to save the playerUID in the CharacterID cell instead of the characterID one. Why ? cause the hiveext.dll doesnt support bigint(24) values for CharacterID.
Anyways...I've been rewriting the server_swapObject.sqf and i noticed something REALLY WEIRD.
My hivewrite:
vgserver_hiveWrite = { private["_mykey","_mydata"]; _mykey = _this; _mydata = format["Arma2NETMySQLCommand ['dayz',""%1""]",_mykey]; SQL_RESULT = "Arma2Net.Unmanaged" callExtension _mydata; };
While the sql in the server_publishObject.sqf works fine:
_keyobj = format["insert into object_data (ObjectUID, Instance, Classname, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Damage, Datestamp) values ('%1','%2','%3','%4','%5','%6','%7','%8','%9', CURRENT_TIMESTAMP)",_uid,dayZ_instance,_class,_charID,_worldspace,_inventory,_hitpoints,_fuel,'0']; //diag_log ("HIVE: WRITE: >>> Player Build <<<"+ str(_keyobj)); _keyobj call vgserver_hiveWrite;
The same SQL in server_swapObject.sqf,
_keyvg= format["insert into object_data (ObjectUID, Instance, Classname, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Damage, Datestamp) values ('%1','%2','%3','%4','%5','%6','%7','%8','%9',CURRENT_TIMESTAMP)",_uid,dayZ_instance,_class,_characterID,_worldspace,_inventory,_hitpoints,_fuel,_damage]; diag_log ("HIVE: WRITE: >>>>>>>>> Player UPGRADED/DOWNGRADE <<<<<<<<<<<"+ str(_keyvg)); _keyvg call vgserver_hiveWrite;
although there is a proper mysql entry in arma2net log, it DOESNT get executed (or it does but epoch deletes the entry...i cant figure this out) and instead just the 1st object in the database gets deleted (as it should be since its deleting it and then creates and publishes the upgraded object).
No matter what i do, no matter how i tweak the SQL query, i cant get a 100% successful result.
Sometimes it upgrades the object and writes it in the db and sometimes it doesnt.
IF the object doesnt have a lock, then it will 90% work. If it does then i get about 50% chance the sql will get executed (like i said, not sure if it gets deleted by epoch after insertion....no logs no nadda).
I found a guy here: http://forums.dayzgame.com/index.php?/topic/163482-issue-with-door-locks-on-my-server/
That had the same problem....and he was also pointing to the same file....
Also i say that Plot for Life people experience the same difficulties ( i dont have that mod ).
Whats going on here ? Anyone knows ?
To test this i build a CinderWallDoor_DZ and change it to a CinderWallDoorLocked_DZ with a Lock....upgrading / downgrading it all the time and checking the db and logs to catch the error.
Is epoch (like server_monitor or something else) checking/deleting stuff and not post anything in the logs ?
Or simple for some FREAKING WEIRD reason arma2net is not getting executed ?
In the logs all looks fine :
10/17/2014 17:05:02 function: Arma2NETMySQLCommand ['dayz',"insert into object_data (ObjectUID, Instance, Classname, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Damage, Datestamp) values ('6035813732696','13','CinderWallDoorLocked_DZ','634','[96.4591,[6035.77,1373.21,-0.0568657]]','[]','[]','0','0',CURRENT_TIMESTAMP)"] 10/17/2014 17:05:02 maxResultSize: 10239 10/17/2014 17:05:02 Result size: 4 10/17/2014 17:05:02 Result: [[]]
but the object does not exist in the db....and if i manually execute this SQL it inserts fine.
ps: Same thing for downgrading objects.