Ranwer135 308 Posted October 28, 2015 I think the author has abandoned the thread, so I'll provide my example tested below: private ["_pdw"]; _pdw = ["new", "profile"] call OO_PDW; //Creates a new profile/Database within iniDBI tag_fnc_loadplayer = { ["setFileName", "myProfileDB"] call _pdw; ["loadPlayer", player] call _pdw; ["loadInventory", [name player, player]] call _pdw; }; [] spawn tag_fnc_loadplayer; //This loads the player's gear, stuff, etc., from the profile stated above. tag_fnc_syncplayer = { ["savePlayer", player] call _pdw; ["saveInventory", [name player, player]] call _pdw; sleep 1; call tag_fnc_syncplayer; }; [] spawn tag_fnc_syncplayer; //This saves the player's gear, stuff, etc., into the profile stated above. Hope it helps, Rawner135 Share this post Link to post Share on other sites
Finnegan Ogrady 0 Posted December 14, 2015 Hi im not actualy new at coding in arma but i don't relly undestand the database codes i would aprechiate it if somone would make a few examle codes and say what hey do i gues i could figur then the rest out my self. (somthink like example car should be saved status inventory and position evry half houer and only load on server restart) Share this post Link to post Share on other sites
code34 248 Posted December 21, 2015 Hi A 0.7 alpha version, which support inidbi2, is released on github, can you check it before the officiel release ? :) https://github.com/code34/oo_pdw.Altis Share this post Link to post Share on other sites
SparkZ 10 Posted December 24, 2015 Does it save vehicle an boxes contents too? Share this post Link to post Share on other sites
dopeex 10 Posted December 24, 2015 Does it save vehicle an boxes contents too? It does not save anything because it does not work With the mission for the mydb.ini looks like and nothing is too loaded [pdw] pdw_unit_="[[0,0,0],0,0]" pdw_inventory_Error: No vehicle="["","","",<null>,"",<null>,"",<null>,"",<null>,[],"",<null>,[],"",<null>,[],<null>]" pdw_object_objects_0="["B_Heli_Light_01_F",[14704.6,16767.4,0.00597572],359.998,0,[["arifle_MXC_F"],[2]],[["SmokeShell","SmokeShellBlue","30Rnd_65x39_caseless_mag"],[2,2,4]],[["FirstAidKit","ToolKit","ItemGPS"],[2,1,1]],[["B_Parachute"],[4]]]" pdw_object_objects_1="["B_APC_Tracked_01_rcws_F",[14700.9,16751.6,-0.0880413],0.000806173,0,[["arifle_MX_F","arifle_MX_SW_F","launch_NLAW_F"],[2,1,1]],[["30Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag","HandGrenade","MiniGrenade","1Rnd_HE_Grenade_shell","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","SmokeShell","SmokeShellGreen","SmokeShellOrange","SmokeShellBlue","Titan_AT","Titan_AP","Titan_AA"],[24,12,6,6,6,3,3,3,3,8,8,8,8,2,2,2]],[["FirstAidKit"],[10]],[[],[]]]" pdw_object_objects_2="["Land_InfoStand_V1_F",[14707.8,16753.6,0.000104904],0.00788262,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_objects="2" Share this post Link to post Share on other sites
code34 248 Posted December 24, 2015 Does it save vehicle an boxes contents too? yes it should save also contents of vehicles Share this post Link to post Share on other sites
code34 248 Posted December 24, 2015 It does not save anything because it does not work With the mission for the mydb.ini looks like and nothing is too loaded it seems you try to save a non vehicle object. pdw_inventory_Error: No vehicle="["","","",<null>,"",<null>,"",<null>,"",<null>,[],"",<null>,[],"",<null>,[],<null>]" it could be a good way first to check your parameter :) Share this post Link to post Share on other sites
SparkZ 10 Posted December 25, 2015 it seems you try to save a non vehicle object. Does that mean it doesn't save normal objects? Like basebuilding? Share this post Link to post Share on other sites
code34 248 Posted December 25, 2015 if you call "saveObjects" method it only save the vehicles object that are visible through the native command vehicles if you call "saveObject" it save the object you give in parameter :) 1 Share this post Link to post Share on other sites
dopeex 10 Posted December 25, 2015 it seems you try to save a non vehicle object. it could be a good way first to check your parameter :) This is the result of your example mission and I have not made any changes to it. Share this post Link to post Share on other sites
code34 248 Posted December 25, 2015 This is the result of your example mission and I have not made any changes to it. what version, do you use the lastest on git ? :) what version of inidbi ? Share this post Link to post Share on other sites
dopeex 10 Posted December 26, 2015 This: https://www.dropbox.com/s/tn47aag6t9m41a7/oo_pdw.altis.zip?dl=0 with inidbi - v1.4 and your mission test that is there with it, in order to understand how this works. Without a functioning test mission, I'll never understand how I need to adjust my own mission. I also tried your version from git, with inidbi2 but there is the same test mission there which was apparently not brought up to date, was certainly my impression. Also I did not get to run. Share this post Link to post Share on other sites
code34 248 Posted December 26, 2015 ok dopeex :) it should work with next version, we will try it 1 Share this post Link to post Share on other sites
code34 248 Posted December 26, 2015 hi guys :) just release the new version 0.7 of PDW changelog: - Compatibilty with inidbi2 (inidbi1 is not anymore compatible) - fix saveObjects method Download from Dropbox Share this post Link to post Share on other sites
dopeex 10 Posted December 26, 2015 (edited) Okay the new version 0.7 with inidbi2 from here http://www.armaholic.com/page.php?id=29823and your example mission... result: [pdw] pdw_unit_="[[0,0,0],0,0]" pdw_inventory_Error: No vehicle="["","","",<null>,"",<null>,"",<null>,"",<null>,[],"",<null>,[],"",<null>,[],<null>]" pdw_object_objects_0="["B_Heli_Light_01_F",[11530.1,11708.7,0.0059948],359.998,0,[["arifle_MXC_F"],[2]],[["SmokeShell","SmokeShellBlue","30Rnd_65x39_caseless_mag"],[2,2,4]],[["FirstAidKit","ToolKit","ItemGPS"],[2,1,1]],[["B_Parachute"],[4]]]" pdw_object_objects_1="["B_Heli_Light_01_F",[11538.8,11711.7,0.00604248],359.992,0,[["arifle_MXC_F"],[2]],[["SmokeShell","SmokeShellBlue","30Rnd_65x39_caseless_mag"],[2,2,4]],[["FirstAidKit","ToolKit","ItemGPS"],[2,1,1]],[["B_Parachute"],[4]]]" pdw_object_objects_2="["B_Heli_Light_01_F",[11532.3,11720.8,0.00609398],359.998,0,[["arifle_MXC_F"],[2]],[["SmokeShell","SmokeShellBlue","30Rnd_65x39_caseless_mag"],[2,2,4]],[["FirstAidKit","ToolKit","ItemGPS"],[2,1,1]],[["B_Parachute"],[4]]]" pdw_object_objects_3="["Land_Workbench_01_F",[11542.8,11726.4,1.90735e-005],360,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_4="["Land_Pallet_MilBoxes_F",[11548.2,11724,-0.000305176],360,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_5="["Land_BagFence_Corner_F",[11536.3,11732.3,-0.00195503],359.999,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_6="["Land_Scrap_MRAP_01_F",[11541.8,11733,-0.000144958],360,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_7="["Land_WinnersPodium_01_F",[11543.7,11748.6,-3.8147e-006],360,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_8="["Land_Wreck_BMP2_F",[11550.4,11737,0.000869751],360,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_9="["I_UGV_01_F",[11552.4,11748.6,0.0108204],359.999,0,[[],[]],[[],[]],[["FirstAidKit"],[4]],[[],[]]]" pdw_object_objects_10="["Land_Loudspeakers_F",[11561.3,11743.4,0.000217438],359.999,0,[[],[]],[[],[]],[[],[]],[[],[]]]" pdw_object_objects_11="["B_G_Offroad_01_repair_F",[11553.6,11762.8,-0.0285912],0.00271156,0,[[],[]],[[],[]],[["FirstAidKit"],[4]],[[],[]]]" pdw_objects="11" So what you see above is the result, if I with inidbi2 on the server loading the mission and then go up. When I start a multiplayer mission, with the example mission and inidbi2 on my PC, then I land without clothes and all somewhere on the map ... what am I doing wrong I do not understand ... I mean with you it will work but otherwise you would not publish it. here is the .rpt file from server http://pastebin.com/zKXVHaYM Edited December 26, 2015 by dopeex Share this post Link to post Share on other sites
Guest Posted December 26, 2015 New version frontpaged on the Armaholic homepage. Object Oriented Persistent Data World (OO PDW) v0.3 iniDBI ** Armaholic now supports authors with donation button/links. If you have those please contact me! Share this post Link to post Share on other sites
code34 248 Posted December 26, 2015 Okay the new version 0.7 with inidbi2 from here http://www.armaholic.com/page.php?id=29823and your example mission... result: So what you see above is the result, if I with inidbi2 on the server loading the mission and then go up. When I start a multiplayer mission, with the example mission and inidbi2 on my PC, then I land without clothes and all somewhere on the map ... what am I doing wrong I do not understand ... I mean with you it will work but otherwise you would not publish it. here is the .rpt file from server http://pastebin.com/zKXVHaYM first you should delete old inidbi addons, and check if inidbi2 is well loaded, delete the old pdw database that seems to be corrupted in @inidbi2/db/pdw.ini Share this post Link to post Share on other sites
code34 248 Posted December 26, 2015 New version frontpaged on the Armaholic homepage. Object Oriented Persistent Data World (OO PDW) v0.3 iniDBI ** Armaholic now supports authors with donation button/links. If you have those please contact me! thanks ! :) Share this post Link to post Share on other sites
dopeex 10 Posted December 26, 2015 So i have cleaned up my server and install inidbi2 and the mission clear and it is the same result... .rpt file: http://pastebin.com/E2kS8xNa Share this post Link to post Share on other sites
code34 248 Posted December 26, 2015 there is nasty thing in your logs :( do you check inibdi is working ? do you turn off battleeye ? Share this post Link to post Share on other sites
tebbbs 33 Posted December 26, 2015 will you support extDB2 later on? because i am working on a similar addon that works with extDB2 but i think yours looks better. I wouldnt continue, if i would know, that you add MySQL support later on Share this post Link to post Share on other sites
dopeex 10 Posted December 26, 2015 I have now once again put everything I've tried it with and without BattlEye etc. and always the same, the db file and the .rpt will always look exactly the same. inidbi2 runs definitely. I am really at a loss... Share this post Link to post Share on other sites
Azza FHI 50 Posted December 27, 2015 I think the author has abandoned the thread, so I'll provide my example tested below: private ["_pdw"]; _pdw = ["new", "profile"] call OO_PDW; //Creates a new profile/Database within iniDBI tag_fnc_loadplayer = { ["setFileName", "myProfileDB"] call _pdw; ["loadPlayer", player] call _pdw; ["loadInventory", [name player, player]] call _pdw; }; [] spawn tag_fnc_loadplayer; //This loads the player's gear, stuff, etc., from the profile stated above. tag_fnc_syncplayer = { ["savePlayer", player] call _pdw; ["saveInventory", [name player, player]] call _pdw; sleep 1; call tag_fnc_syncplayer; }; [] spawn tag_fnc_syncplayer; //This saves the player's gear, stuff, etc., into the profile stated above. Hope it helps, Rawner135 with that code in init.sqf i get the following error http://imgur.com/vFQ6AjX oop.h and oo_pdw.sqf are in mission directory, and call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"; is in init.sqf. client and dedicated server are running @inidbi2 Share this post Link to post Share on other sites
code34 248 Posted December 27, 2015 with that code in init.sqf i get the following error http://imgur.com/vFQ6AjX oop.h and oo_pdw.sqf are in mission directory, and call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"; is in init.sqf. client and dedicated server are running @inidbi2 it seems you forgot to pass _pdw as parameter to your spawn functions :) will you support extDB2 later on? because i am working on a similar addon that works with extDB2 but i think yours looks better. I wouldnt continue, if i would know, that you add MySQL support later on to support extDB2, it will require to also have a driver like oo_inidbi to have a standard interface :) but i have no request about that I have now once again put everything I've tried it with and without BattlEye etc. and always the same, the db file and the .rpt will always look exactly the same. inidbi2 runs definitely. I am really at a loss... if you use the standard code in the archive, it should be a dll loading problem try to do something like this, to check if your inidbi2 is working well sleep 5; _inidbi = ["new", "test"] call OO_INIDBI; hint format ["%1", "getVersion" call _inidbi]; Share this post Link to post Share on other sites
Azza FHI 50 Posted December 27, 2015 it seems you forgot to pass _pdw as parameter to your spawn functions :) How do i do that? Thank you Share this post Link to post Share on other sites