Jump to content
code34

OO PDW - oriented object Persistent Data World

Recommended Posts

Update frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

thank you for showing this thread to me code34, are you able to provide an example of how we could achieve what we want?

we want to use this for normal missions, so that if a player drops out and reconnects their gear and position is restored.

Share this post


Link to post
Share on other sites

hi

you should read the first post of this thread :) all examples are shown

Share this post


Link to post
Share on other sites

I saw all the examples but could not get any to work. @Inidbi is only installed on dedicated server is that correct?

Share this post


Link to post
Share on other sites

yes, it depends of your code. If you use inidbi from server side code.

Share this post


Link to post
Share on other sites
yes, it depends of your code. If you use inidbi from server side code.

Hi, i am testing this on server, but nothing is save after reset who i can do this?

Share this post


Link to post
Share on other sites

check vc microsoft library and files permissions on dll, and directories

Share this post


Link to post
Share on other sites
doesn't work on a dedicated server

first at all hi, i m sad to hear you have a problem. Are you its relative to pdw ?

Share this post


Link to post
Share on other sites
first at all hi, i m sad to hear you have a problem. Are you its relative to pdw ?

100% sure, Works on local but not dedicated (Running exact files)

---------- Post added at 01:57 ---------- Previous post was at 01:40 ----------

100% sure, Works on local but not dedicated (Running exact files)

http://cloud1.foxgamingservers.com/index.php/s/uqaj47dMkuaUlma <--- my server file

Share this post


Link to post
Share on other sites
100% sure, Works on local but not dedicated (Running exact files)

---------- Post added at 01:57 ---------- Previous post was at 01:40 ----------

http://cloud1.foxgamingservers.com/index.php/s/uqaj47dMkuaUlma <--- my server file

if it works on local it works also on server. There is no difference between them on pdw side perhaps a problem with inidbi installation, you should shake your server side installation (always same thing , vc++ library are not install, not the good right permissions on dll, or directories etc)

Share this post


Link to post
Share on other sites
if it works on local it works also on server. There is no difference between them on pdw side perhaps a problem with inidbi installation, you should shake your server side installation (always same thing , vc++ library are not install, not the good right permissions on dll, or directories etc)

The only thing it can do is read the database of vehicles, Unable to write etc.. Its not a rights of files problem either as we use inidbi for our own zeus mission which works perfectly fine

---------- Post added at 14:16 ---------- Previous post was at 14:03 ----------

PDW: requires INIDBI <-- if a client tries to initialize his load he gets that error also and i know the server is running with inidbi, does everyone have to run with inidbi?

Edited by Jetfox

Share this post


Link to post
Share on other sites

Hey code34,

sorry for my english, its not my native language... I have some problems with your example mission. The functions work when you call them from the initServer.sqf, but from every different sqf's they won't run.

I create a addAction.sqf and call it via the initServer.sqf

player addAction ["loadPlayer", {

["loadPlayer", player] call _pdw;

hint "Restore Player";

}];

This is in the file. Everytime i activate the action in the actionmenu the hint is shown, but the function read nothing from the created mydb.ini .

Hope you can help me :)

Edit: I just want to test it with the loadPlayer function, i know , that i need loadInventory to get the players inventory

2nd Edit: IT WORKS , for everyone who have the same problem you need to define the variable like this in the addAction:

player addAction ["loadPlayer", {

_pdw = ["new", "inidbi"] call OO_PDW;

["setFileName", "mydb"] call _pdw;

["loadPlayer", player] call _pdw;

hint "Restore Player";

}];

Thank you code34 for this awesome things.

Edited by Arconymous

Share this post


Link to post
Share on other sites

So can someone give me an example on saving all units (including players) and objects?

Share this post


Link to post
Share on other sites

I would also like to know if anyone has actually had success with this, is there a good example of just saving some players equipment, and then loading it? I read through all the documentation but still couldn't get this to work.

Share this post


Link to post
Share on other sites

How to use this code?

        Function: = ["saveObject", [_name, _object]] call OO_PDW;
        save object, and all its cargo
        
        Parameters:
            _name : string
            _object : object

I have a ammo box, name: Ammo2

I'm trying to save ammo box and its cargo but i can't figure out how to do it.

_name and _object , How i should fill this parameters?

 

Some RPT errors i got:

 7:10:32 Error in expression <};};

case ((_access >= 0) && {(_member == "constructor")} && {((_argType == toU>
 7:10:32   Error position: <== "constructor")} && {((_argType == toU>
 7:10:32   Error ==: Type Array, expected Number,String,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Location
 7:10:32 File C:\Users\Persian MO\Documents\Arma 3\missions\oo_pdw.Altis\oo_pdw.sqf, line 9

Share this post


Link to post
Share on other sites

Hi,

 

I have no idea on how to use this for my mod.

 

I want it to check if a UID matches the player. If it matches, it restores the players location, gear, and health. If not, it will create a new save when the default gear set is loaded.

Share this post


Link to post
Share on other sites
Guest
        Function: = "saveObjects" call OO_PDW;
        Save all objects
        
        Parameters:
            none

Save objects and then load , it spawn old and new items/weapons/mags in cargo. for example if you have 1 launcher before save, after load you will have 2 launcher in cargo.

Is it a bug or i'm doing something wrong?

 

* There is any way to set a name for restored objects.For example save and restore a ammo box and then add some eventhandler to that ammo box?

Share this post


Link to post
Share on other sites

 

How to use this code?

        Function: = ["saveObject", [_name, _object]] call OO_PDW;
        save object, and all its cargo
        
        Parameters:
            _name : string
            _object : object

I have a ammo box, name: Ammo2

I'm trying to save ammo box and its cargo but i can't figure out how to do it.

_name and _object , How i should fill this parameters?

 

Some RPT errors i got:

 7:10:32 Error in expression <};};

case ((_access >= 0) && {(_member == "constructor")} && {((_argType == toU>
 7:10:32   Error position: <== "constructor")} && {((_argType == toU>
 7:10:32   Error ==: Type Array, expected Number,String,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Location
 7:10:32 File C:\Users\Persian MO\Documents\Arma 3\missions\oo_pdw.Altis\oo_pdw.sqf, line 9

Anyone can help me?

Share this post


Link to post
Share on other sites

Anyone can help me?

 

 

i dont read all but i would say,

 

_name : string // is the savename in inidbi and 

_object : object // is the crate 

 

 

 ["saveObject", ["myCustomBox", myBoxVar]] call OO_PDW;

 

then you use the load function and call the box with "myCustomBox" as inidbi object

 

#edit

 

 ["loadObject", "myCustomBox] call OO_PDW;

Share this post


Link to post
Share on other sites

i dont read all but i would say,

 

_name : string // is the savename in inidbi and 

_object : object // is the crate 

 

 

 ["saveObject", ["myCustomBox", myBoxVar]] call OO_PDW;

 

then you use the load function and call the box with "myCustomBox" as inidbi object

 

#edit

 

 ["loadObject", "myCustomBox] call OO_PDW;

Thanks for respond.

I tried this but i got error.

RPT:

7:10:32 Error in expression <};};

case ((_access >= 0) && {(_member == "constructor")} && {((_argType == toU>
 7:10:32   Error position: <== "constructor")} && {((_argType == toU>
 7:10:32   Error ==: Type Array, expected Number,String,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Location
 7:10:32 File C:\Users\Persian MO\Documents\Arma 3\missions\oo_pdw.Altis\oo_pdw.sqf, line 9

This is the code.

initserver.sqf

        call compilefinal preprocessFileLineNumbers "oo_pdw.sqf";
        
        sleep 2;

        _pdw = ["new", "inidbi"] call OO_PDW;
        ["setFileName", "mydp"] call _pdw;

        sleep 10;
       ["saveObject", ["myCustomBox",myBoxVar]] call OO_PDW;
        hint "Save all objects";  

I tried some other names but same result.

    

 

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

×