Jump to content

Recommended Posts

hello,

 

I want to use iniDB.

 

iniDB_write is working:

		_setplayerdate = [_datenbaseplayer, "GENERAL", "TIME", "00.00.2018"] call iniDB_write;
		_setplayeruid = [_datenbaseplayer, "GENERAL", "UID", _playeruid] call iniDB_write;
		_setplayername = [_datenbaseplayer, "GENERAL", "NAME", _playername] call iniDB_write;
		_setplayerpos = [_datenbaseplayer, "GENERAL", "POS", _playerpos] call iniDB_write;

		_setplayerloadout = [_datenbaseplayer, "GENERAL", "LOADOUT", _playerloadout] call iniDB_write;

database:

[GENERAL]
TIME="00.00.2018" // Real Time, Coming soon, if arma can do it...
UID="76561198063570550"
NAME="*****"
POS="[36361.5,12291.6,0.00143909]"
LOADOUT="[[],[],[],["U_C_man_sport_2_F",[["FirstAidKit",1],["Chemlight_red",1,1],["Chemlight_blue",1,1],["SmokeShellRed",1,1],["SmokeShellYellow",1,1]]],[],[],"","",["Binocular","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","Itemwatch","NVGoggles"]]"

 

 

Reading is not working:

_loadplayerpos = [_datenbaseplayer, "GENERAL", "UID", "STRING"] call iniDB_read;
hint format ["%1",_loadplayerpos];

 

output:

"any"

 

I googled a lot and everyone has iniDB_read like me.

Can anyone give me a hint?
Unfortunately, I do not know what I'm doing wrong.
Thank you very much

Share this post


Link to post
Share on other sites

Have you checked the .ini file manually to see if the UID is saved properly? If it has saved, ensure that _datenbaseplayer is defined in the same file that you call iniDB_read from.

Share this post


Link to post
Share on other sites

the saving it works.

 

 

no output if I set the database manually:

// init.sqf
call compile preProcessFile "\inidbi\init.sqf";

[] execVM "scripts\system\db\save_inidbi.sqf";

_loadplayeruid = ["7656119806*******", "GENERAL", "UID", "STRING"] call iniDB_read;
hint format ["%1",_loadplayeruid];

as if "call iniDB_read" is not defined.

 

Share this post


Link to post
Share on other sites

Unfortunately, my problem persists.

 

version: inidbi - v1.4

 

did not anyone have a similar problem?

Share this post


Link to post
Share on other sites

So this is inidbi (1) and not INIDBI2 ?

Share this post


Link to post
Share on other sites

yes, INIDBI1 (32 bit).
INIDBI2 (64 bit) I did not understand how it works.
I have not found a simple tutorial yet.

Share this post


Link to post
Share on other sites

Ok well can't help you there, I have only used the version 2

Share this post


Link to post
Share on other sites

INIDBI2 (64 bit) install.

 

//	init.sqf:
_inidbi = ["new", "test"] call OO_INIDBI;

_write = ["write", ["GLOBAL", "cat", "text"]] call _inidbi;


sleep 5;

_read = ["read", ["GLOBAL", "cat"]] call _inidbi;
hint format ["%1",_read];
// Output: "any"
sleep 5;

_read2 = "getVersion" call _inidbi;
hint format ["%1",_read2];
// Output "any"

Database read ok:

[GLOBAL]
cat=""text""

 

when I'm in the A3 Launcher the mod "@inidbi2" load, loading, then reading works in Eden Editor Multiplayer.

 

@inidbi2 is in -servermod

 

my start.bat:

@echo off

start arma3server_x64.exe  -port=2302 "-config=config.cfg" "-cfg=basic.cfg" "-profiles=profile" -name=server -filePatching "-servermod=mods\@inidbi2;" "-mod=mods\@Australia 5.0.9;" -autoInit

timeout 3

 

Unfortunately I do not know where the error is.

Thanks again for your help.

Share this post


Link to post
Share on other sites

If get version fails it must mean the mod is not loaded.

 

Did the write work or did you put that in the db manually?

Share this post


Link to post
Share on other sites

Sorry I don't know what's wrong. I have used the inidbi2 my self without problems

 

maybe you could try some more writes to make sure they work?

 

the author of the mod @code34 might have some ideas 

Share this post


Link to post
Share on other sites

update:

 

init.sqf:

_inidbi = ["new", "test"] call OO_INIDBI;

_write = ["write", ["GLOBAL", "one", "text-one"]] call _inidbi;
_write2 = ["write", ["GLOBAL", "two", "text-two"]] call _inidbi;
_write3 = ["write", ["GLOBAL", "three", "text-three"]] call _inidbi;


sleep 15;

_read = ["read", ["GLOBAL", "one"]] call _inidbi;
systemchat str[_read];

_read2 = ["read", ["GLOBAL", "two"]] call _inidbi;
systemchat str[_read2];

_read3 = ["read", ["GLOBAL", "three"]] call _inidbi;
systemchat str[_read3];

output:

Unbenannt.png

 

 

Database:

[GLOBAL]
cat=""text""
one=""text-one""
two=""text-two""
three=""text-three""

 

 

the writing of variables works.

reading variables does not work.

 

when I load the mod "@ inidbi2" in the A3 Launcher, and run multiplayer test in the eden editor, reading and writing will work without errors.

I am using a Windows 10 Pro server.

Share this post


Link to post
Share on other sites

So strange. I would understand if writing failed and not reading.

 

Well it probably doesn't matter but I would make the db variable global and not local

 

Share this post


Link to post
Share on other sites

hi,

 

yes like gc8 said, first at all check with
 

sleep 2;

_inidbi = ["new", "test"] call OO_INIDBI;
_version  = "getVersion" call _inidbi;
hintc format["version %1", _version];

 

Share this post


Link to post
Share on other sites

on server:

Unbenannt.png

 

 

with @inidbi2 in the launcher -> eden editor multiplayer test:

Unbenannt2.png

Share this post


Link to post
Share on other sites

on server side, you have to use

 

sleep 2;

_inidbi = ["new", "test"] call OO_INIDBI;
_version = "getVersion" call _inidbi;
diag_log format["version %1", _version];

and check into arma log for results :)

Share this post


Link to post
Share on other sites

add initserver.sqf:

_inidbi = ["new", "test"] call OO_INIDBI;
_version = "getVersion" call _inidbi;
_write = ["write", ["GLOBAL", "VERSION", _version]] call _inidbi;

 

test.ini (Database):

[GLOBAL]
cat=""text""
one=""text-one""
two=""text-two""
three=""text-three""
VERSION=""Inidbi: 2.05 Dll: 2.05""

 

the writing works well therefore I do not understand why he does not want to read.

as if he had no rights to read :/

 

 

edit:

I have now created a new empty Altis mission.

Writing works. Reading does not work. -.-

Share this post


Link to post
Share on other sites
2 hours ago, LoOni3r said:

as if he had no rights to read :/

 

Does you server have both write and read rights for the files?

Share this post


Link to post
Share on other sites

I assume otherwise the writing would not work.

For testing, I use dedected Arma 3 server on my local windows 10 pro pc

Share this post


Link to post
Share on other sites
3 minutes ago, LoOni3r said:

I assume otherwise the writing would not work.

 

It's possible in windows to have write access but not read. But I'm not expert in that

Share this post


Link to post
Share on other sites

It's not the DLL that has the problem but the ini db file.. Or could be dll too...

Share this post


Link to post
Share on other sites

did you create the .ini file you self? maybe delete it and change db name and try again. I'm running out of ideas..

Share this post


Link to post
Share on other sites

the database was created by inidb mod.
if I delete this, the database is created as I have defined it.

Changing the database name does not change anything

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

×