Jump to content
code34

OO PDW - oriented object Persistent Data World

Recommended Posts

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

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

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

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

 

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

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

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 :)

  • Like 1

Share this post


Link to post
Share on other sites

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

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

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

ok dopeex :) it should work with next version, we will try it

  • Like 1

Share this post


Link to post
Share on other sites

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

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 by dopeex

Share this post


Link to post
Share on other sites

 

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

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

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
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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×