gc8 970 Posted December 6, 2018 Make sure you checked the file permission for your username? Share this post Link to post Share on other sites
code34 248 Posted December 6, 2018 can you try to put @inidbi2 at the root of \arma3\ directory instead of subdirectory ? Share this post Link to post Share on other sites
LoOni3r 6 Posted December 6, 2018 52 minutes ago, code34 said: can you try to put @inidbi2 at the root of \arma3\ directory instead of subdirectory ? I already tested. did not work either -.- Share this post Link to post Share on other sites
code34 248 Posted December 7, 2018 same as above, try to use diag_log instead of systemchat that doesn't work for locality reason. _read = ["read", ["GLOBAL", "one"]] call _inidbi; diag_log format["result", _read]; _read2 = ["read", ["GLOBAL", "two"]] call _inidbi; diag_log format["result2", _read2]; _read3 = ["read", ["GLOBAL", "three"]] call _inidbi; diag_log format["result3", _read3]; Share this post Link to post Share on other sites
LoOni3r 6 Posted December 7, 2018 nothing happens. even if I enter it in the debug console May I see a few examples of you saving and reading something? Share this post Link to post Share on other sites
code34 248 Posted December 7, 2018 for locality reason, you can only see this in the server logs :) Share this post Link to post Share on other sites
MrCopyright 107 Posted December 9, 2018 Are you sure you aren't calling the iniDB functions from the client in a multiplayer environment? If the version is displayed in the Eden editor but not a hosted server, it seems very likely that locality is your issue. Share this post Link to post Share on other sites
LoOni3r 6 Posted December 9, 2018 correctly. as if inidb2 would not work in multiplay. How can I verify that? can that be changed? Share this post Link to post Share on other sites
LoOni3r 6 Posted January 9, 2019 Hello everyone, I'm almost finished scriping my server and now need a way to save. I deleted the @inidb2 and downloaded it from armaholic. the x64.dll downloaded from https://github.com/code34/inidbi2/tree/master/%40inidbi2 Mission pbo (new mission created for testing) https://www.file-upload.net/download-13462924/inidb.Altis.pbo.html start.bat @echo off start arma3server_x64.exe -port=2302 "-config=config2.cfg" "-servermod=mods\@inidbi2;" timeout 3 config2.cfg hostName = "test server - not join!"; password = ""; passwordAdmin = "qwertz"; serverCommandPassword = ""; class Missions { class Mission_1 { template = inidb.Altis; difficulty = "regular"; }; }; 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]; sleep 10; _version = "getVersion" call _inidbi; hintc format["version %1", _version]; Database test.ini [GLOBAL] one=""text-one"" two=""text-two"" three=""text-three"" Result As before, I do not understand now that does not call the variables. I am desperate and really need your help. maybe @code34 still has an idea. if it should be important: i use windows 10 pro with i7-8700k and 64gb ram I would like to thank you again for your help! Many Thanks Share this post Link to post Share on other sites
code34 248 Posted January 9, 2019 hi LoOni3r you have to take in account the locality. init.sqf is executed on both side server and client. If you load some informations on server side, you have to use only initServer.sqf. When your data are load you have to send them via publicvariable on client and receive them with an handler for simplicity, you can test with something like this: _version = "getVersion" call _inidbi; str(_version) remoteExec ["systemChat"]; Share this post Link to post Share on other sites
LoOni3r 6 Posted January 9, 2019 Many thanks! I finally got it. hen i will have to work a lot with publicvariable. thanks for the support Share this post Link to post Share on other sites
LoOni3r 6 Posted January 10, 2019 Can you limit a public variable to a client? I want to send the saved player data (position, loadout, ..) to the client with player connect. so I can put the player position, loadout, ... at the reconnect Share this post Link to post Share on other sites
gc8 970 Posted January 10, 2019 4 minutes ago, LoOni3r said: Can you limit a public variable to a client? https://community.bistudio.com/wiki/publicVariableClient Share this post Link to post Share on other sites
Dedmen 2588 Posted January 10, 2019 (edited) 5 minutes ago, LoOni3r said: Can you limit a public variable to a client? https://community.bistudio.com/wiki/publicVariableClient @gc8 :D split second! Edited January 10, 2019 by Dedmen 1 Share this post Link to post Share on other sites
LoOni3r 6 Posted January 10, 2019 like this? //server playerpos = ["read", ["GENERAL", "POS"]] call _inidbi; _playeruid = getPlayerUID player; _playeruid publicVariableClient "playerpos"; //initplayerlocal hint str[playerpos]; Share this post Link to post Share on other sites
Schatten 262 Posted January 10, 2019 @LoOni3r, on client side you need to use addPublicVariableEventHandler command. Share this post Link to post Share on other sites
Dedmen 2588 Posted January 10, 2019 36 minutes ago, Schatten said: @LoOni3r, on client side you need to use addPublicVariableEventHandler command. Why? what for? Share this post Link to post Share on other sites
Schatten 262 Posted January 10, 2019 17 hours ago, Dedmen said: Why? what for? For handling of transferring of global variable from server to client, obviously. Share this post Link to post Share on other sites
Dedmen 2588 Posted January 11, 2019 15 hours ago, Schatten said: For handling transferring of global variable from server to client, obviously. I don't understand? Do you know what a Public Variable Eventhandler does? Share this post Link to post Share on other sites
Schatten 262 Posted January 11, 2019 45 minutes ago, Dedmen said: Do you know what a Public Variable Eventhandler does? Sure. Share this post Link to post Share on other sites
LoOni3r 6 Posted January 11, 2019 can you give me an example? I tried a lot yesterday and today and can not get it another question: can inidb2 handle multiple databases? I would like to have a .ini file for each player. if I do so I get no more output while {true} do{ // Player Data { _playeruid = getPlayerUID _x; _playername = name _x; _playerpos = getPosASL _x; _playerdir = getDir _x; _playerloadout = getUnitLoadout _x; _datenbaseplayer = ["australia_survival/playerdata/",_playeruid] joinString ""; _inidbi = ["new", _datenbaseplayer] call OO_INIDBI; _setplayerdate = ["write", ["GENERAL", "TIME", "00.00.2018"]] call _inidbi; _setplayeruid = ["write", ["GENERAL", "UID", _playeruid]] call _inidbi; _setplayername = ["write", ["GENERAL", "NAME", _playername]] call _inidbi; _setplayerpos = ["write", ["GENERAL", "POS", _playerpos]] call _inidbi; _setplayerdir = ["write", ["GENERAL", "DIR", _playerdir]] call _inidbi; _setplayerloadout = ["write", ["GENERAL", "LOADOUT", _playerloadout]] call _inidbi; _playerpos = ["read", ["GENERAL", "POS"]] call _inidbi; _playerpos remoteExec ["systemChat"]; }foreach playableUnits; // Player Data ende sleep 3; }; Share this post Link to post Share on other sites
Schatten 262 Posted January 11, 2019 2 hours ago, LoOni3r said: can you give me an example? initPlayerLocal.sqf: waitUntil {time > 0}; playerDataRequest = [player]; publicVariableServer "playerDataRequest"; playerDataRequest = nil; _time = time + 10; waitUntil {!(isNil "playerData") or {_time >= time}}; if (!(isNil "playerData")) then { // Apply player data }; initServer.sqf: "playerDataRequest" addPublicVariableEventHandler { params ["_varName", "_varValue"]; missionNamespace setVariable [_varName, nil]; _varValue params ["_player"]; // Read player data (e.g. by UID) from DB, file, etc. and form playerData variable (owner _player) publicVariableClient "playerData"; playerData = nil; }; But it is very unreliable solution. I suggest you to use remoteExec command. 2 hours ago, LoOni3r said: can inidb2 handle multiple databases? Sure. DB name is given in second argument to OO_INIDBI function. Full documentation can be found here. Share this post Link to post Share on other sites
LoOni3r 6 Posted January 11, 2019 thanks for the example. I will test it afterwards. I know the wiki and unfortunately I have not seen any possibility how I can drive different databases while reading Share this post Link to post Share on other sites
Schatten 262 Posted January 11, 2019 56 minutes ago, Schatten said: I know the wiki and unfortunately I have not seen any possibility how I can drive different databases while reading This is extended version of my example for initServer.sqf file: "playerDataRequest" addPublicVariableEventHandler { params ["_varName", "_varValue"]; missionNamespace setVariable [_varName, nil]; _varValue params ["_player"]; _inidbi = ["new", getPlayerUID _player] call OO_INIDBI; // Read player data and form playerData variable ["delete", _inidbi] call OO_INIDBI; (owner _player) publicVariableClient "playerData"; playerData = nil; }; In this example player UID is used as DB (file) name. Share this post Link to post Share on other sites
Schatten 262 Posted January 11, 2019 @LoOni3r, you already use different files to store players data -- _datenbaseplayer variable value is used as file name. But file name is wrong -- it can't contain slashes. Share this post Link to post Share on other sites