dopeex 10 Posted December 27, 2015 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 I tried it. If I understand it correctly, then after a test.ini in inidbi2 / db should be, she does not !? But inidbi2 seems to work, because the oo_pdw.ini is created. Or have I got that wrong. Share this post Link to post Share on other sites
code34 248 Posted December 27, 2015 How do i do that? Thank you You should check your code and locality problem :) tag_fnc_loadplayer = { _pdw = _this; ["loadPlayer", player] call _pdw; ["loadInventory", [name player, player]] call _pdw; }; _pdw spawn tag_fnc_loadplayer; Share this post Link to post Share on other sites
code34 248 Posted December 27, 2015 I tried it. If I understand it correctly, then after a test.ini in inidbi2 / db should be, she does not !? But inidbi2 seems to work, because the oo_pdw.ini is created. Or have I got that wrong. Do you use a some kind of other stuff than vanilla version ? Do you use other stuff than the simple mission example (like your own code) ? Share this post Link to post Share on other sites
dopeex 10 Posted December 27, 2015 No. I have all other mods etc. removed, the only thing that will be loaded is inidbi2. Share this post Link to post Share on other sites
code34 248 Posted December 27, 2015 No. I have all other mods etc. removed, the only thing that will be loaded is inidbi2. i dont see perhaps you should give a teamviewer acces to your machine to test :( Share this post Link to post Share on other sites
dopeex 10 Posted December 27, 2015 all located on our root server. I'm actually not a fan of someone to let up. But if only there is a chance that it helps then we can try it a lot. When it is best for you? do you have Skype? My name Skype is "Dopex22" Share this post Link to post Share on other sites
code34 248 Posted December 28, 2015 hi guys :) i just release the new version 0.72 of PDW Change logs: - fix return values of methods - add savePlayers & loadPlayers methods - add saveGroups & loadGroups methods - fix initServer.sqf example for MP servers - update documentation Download from Dropbox Share this post Link to post Share on other sites
Guest Posted December 28, 2015 New version frontpaged on the Armaholic homepage. Object Oriented Persistent Data World (OO PDW) v0.72 INIDBI2 ** 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
Azza FHI 50 Posted December 29, 2015 Thanks for the update code34! One question, or suggestion for the next release. Would it be possible to make it so that you can save and restore the exact bullet count for player's loaded magazine and also magazines that are in the vest,backpack,uniform? Share this post Link to post Share on other sites
code34 248 Posted December 29, 2015 Thanks for the update code34! One question, or suggestion for the next release. Would it be possible to make it so that you can save and restore the exact bullet count for player's loaded magazine and also magazines that are in the vest,backpack,uniform? if you have the method/command to do it , i will look to integrate it :) Share this post Link to post Share on other sites
Azza FHI 50 Posted December 30, 2015 i wouldnt know how to code it in, but the command is 'magazinesammo' and 'magazinesammofull' https://community.bistudio.com/wiki/magazinesAmmo Would be pretty sweet if that did get implemented, as currently a player has the ability to exploit more ammo if they leave the server with half mags... Cheers Share this post Link to post Share on other sites
dopeex 10 Posted December 30, 2015 (edited) ok first a big thanks for your update here's an idea for your mission, for example. that works better initServer.sqf: call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"; _pdw = ["new", "inidbi"] call OO_PDW; {deletevehicle _x;} foreach allunits; hint "load AI infantry groups"; "loadGroups" call _pdw; sleep 2; hint "Restore all Players"; "loadPlayers" call _pdw; sleep 2; hint "Delete all objects"; { if!(_x isKindOf "MAN") then { deletevehicle _x; }; }foreach (allMissionObjects "All"); sleep 2; _objects = "loadObjects" call _pdw; hint format ["Restore all objects %1", _objects]; sleep 2; call compilefinal preprocessFileLineNumbers "saveServer.sqf"; saveServer.sqf: _refreshTime = 360; // refresh every 5 minutes // Loop forever while {true} do { call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"; _pdw = ["new", "inidbi"] call OO_PDW; hint "save AI infantry groups"; "saveGroups" call _pdw; sleep 2; hint "Save all players"; "savePlayers" call _pdw; sleep 2; hint "Save all objects"; "saveObjects" call _pdw; sleep 2; // Wait the duration of _refreshTime sleep _refreshTime; }; EDIT: I still lack a solution, the first time to create the file and save it. so not everything is deleted. but that may be only the first time when the DB is not available yet. Edited December 30, 2015 by dopeex Share this post Link to post Share on other sites
dopeex 10 Posted December 30, 2015 ok've encountered an error. Save now works super, but a player will be saved under its id and the load is not yet as the player. thereby the ki loaded and when connecting player he lands in the stored ki. Not under his id stored position which also relates to the inventory. Share this post Link to post Share on other sites
code34 248 Posted December 30, 2015 i wouldnt know how to code it in, but the command is 'magazinesammo' and 'magazinesammofull' https://community.bistudio.com/wiki/magazinesAmmo Would be pretty sweet if that did get implemented, as currently a player has the ability to exploit more ammo if they leave the server with half mags... Cheers i will look for that in my next marathon :) Share this post Link to post Share on other sites
code34 248 Posted December 30, 2015 i wouldnt know how to code it in, but the command is 'magazinesammo' and 'magazinesammofull' https://community.bistudio.com/wiki/magazinesAmmo Would be pretty sweet if that did get implemented, as currently a player has the ability to exploit more ammo if they leave the server with half mags... Cheers can you try this fix and say me if it s ok ? https://github.com/code34/oo_pdw.Altis/archive/0.74.zip 1 Share this post Link to post Share on other sites
code34 248 Posted December 30, 2015 ok've encountered an error. Save now works super, but a player will be saved under its id and the load is not yet as the player. thereby the ki loaded and when connecting player he lands in the stored ki. Not under his id stored position which also relates to the inventory. hi dopeex :) like we said together, a good way to try is to load the player information during the init of mission and after that during the JIP. Share this post Link to post Share on other sites
Azza FHI 50 Posted December 30, 2015 can you try this fix and say me if it s ok ? https://github.com/code34/oo_pdw.Altis/archive/0.74.zip works perfectly mate, thanks. on a side note, i deleted the line near the bottom of the script _object addweapon 'itemgps'; we dont want the players to receive a gps when they load in, nothing else will break by removing that? Share this post Link to post Share on other sites
code34 248 Posted December 31, 2015 works perfectly mate, thanks. on a side note, i deleted the line near the bottom of the script _object addweapon 'itemgps'; we dont want the players to receive a gps when they load in, nothing else will break by removing that? oops :) that s right, it seems it s a useless historic extra feature LOL. i will delete it. Share this post Link to post Share on other sites
NoStatement 0 Posted January 2, 2016 Hello. I really need an easy example for useing inidbi. An example howto make a new database File and howto read and write data in it. An example for Noobs like me :) Share this post Link to post Share on other sites
code34 248 Posted January 2, 2016 Hello. I really need an easy example for useing inidbi. An example howto make a new database File and howto read and write data in it. An example for Noobs like me :) Hello Nostatement, there is some quick example directly in the archive file :) Share this post Link to post Share on other sites
NoStatement 0 Posted January 2, 2016 Hello. I am Sorry for this question <_< . Everything works fine. Very nice work. But i have a new problem. i want to safe objects which i create with createVehicle command. Only these objects should be saved in the database. In the Documentation i have found this: Function: _bool = ["saveObject", [_name, _object]] call _pdw; Save object, and all its cargo Parameters: _name : string name of the object to save _object : object Return : True if success I use this command to spawn a vehicle: _spawn = "B_Heli_Attack_01_F";_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];_dirplr = getDir player;_spwnveh = _spawn createVehicle (_posplr); Can i use _spawn as _name for the database or is there a better solution path? Share this post Link to post Share on other sites
code34 248 Posted January 2, 2016 hi no matter of what you use as databasename, just try to use something that is readable/understable. it could be "myvehicle" or other :) Share this post Link to post Share on other sites
Azza FHI 50 Posted January 3, 2016 Hello. I really need an easy example for useing inidbi. An example howto make a new database File and howto read and write data in it. An example for Noobs like me :) this example uses the players profile rather than 'inidbi' as it isnt saving much information (gear and position). There are a few extra things in here which u might not need. initplayerlocal.sqf // Runs "initPlayerFirstJoin.sqf" in the mission exactly once per player per mission. private ["_flagName", "_flagValue"]; _flagName = format ["initPlayerFirstJoinRun_%1", getPlayerUID player]; _flagValue = missionNamespace getVariable [_flagName, false]; // Fist Time Join, Assign Gear if (!_flagValue) then { missionNamespace setVariable [_flagName, true]; publicVariable _flagName; [player] execVM "initPlayerFirstJoin.sqf"; }; if (isServer) exitWith {}; // Prevent overwriting data while not on dedicated call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"; pdw = ["new", "profile"] call OO_PDW; // If not first time join, restore gear if (_flagValue) then { waituntil {!isnull player}; sleep 2; ["clearInventory", player] call pdw; sleep 2; ["loadPlayer", player] call pdw; ["loadInventory", [name player, player]] call pdw; }; // Save gear every 30 seconds while {true} do { waituntil {!isnull player}; sleep 30; ["savePlayer", player] call pdw; ["saveInventory", [name player, player]] call pdw; }; 1 Share this post Link to post Share on other sites
1para{god-father} 105 Posted January 3, 2016 Great Example very Helpful ! Share this post Link to post Share on other sites
NoStatement 0 Posted January 6, 2016 Hello. I have a new Question :( . I want to spwan an Object with createvehicle and save this object in my database. I use this Script: house3 = createVehicle ["Land_i_House_Small_02_V2_F", position player, [], 0, "NONE"];house3 setPos [ getPos house3 select 0, getPos house3 select 1, 0]; sleep 2; [] execVM "safeServer.sqf"; house3 is in the database. this is working. But the problem is the position of house3. Here is the Database: pdw_object_house3="["Land_i_House_Small_02_V2_F",[-0.469887,-1.19227,-0.336883],6.70419e-008,0,[[],[]],[[],[]],[[],[]],[[],[]]]" But the correct position should look like this: [10360.7,2405.42,6.96205],0.130837,0, Can anyone help me with my problem? Share this post Link to post Share on other sites