gc8 977 Posted February 10, 2018 @56Curious looks like the inidbi2 is loaded. wish I could help you more but I don't know much about servers. Share this post Link to post Share on other sites
56Curious 23 Posted February 10, 2018 Damn, oh well see if anyone else can, will gladly provide more info for anyone! :D Share this post Link to post Share on other sites
56Curious 23 Posted February 10, 2018 @gc8 Thank you for trying, helped me clarify some stuff anyway so your time wasn't completly wasted ;) Share this post Link to post Share on other sites
gc8 977 Posted February 10, 2018 Just now, 56Curious said: @gc8 Thank you for trying, helped me clarify some stuff anyway so your time wasn't completly wasted ;) no problem. if there was actual error messages I might be able to help but now I'm clueless Share this post Link to post Share on other sites
56Curious 23 Posted February 10, 2018 I'll run a version of the server now, upload the logs, see if you can spot anything. It is just me doing this within my community rn anyway so no harm in a second pair of eyes. Share this post Link to post Share on other sites
56Curious 23 Posted February 10, 2018 Right here is the latest log. Attempted to save loadout, nothing. Share this post Link to post Share on other sites
gc8 977 Posted February 10, 2018 4 minutes ago, 56Curious said: Right here is the latest log. Attempted to save loadout, nothing. from what I understand the _Request variable is not ok and hence "_Request select 5" causes Zero divisor error. ["write", ["GEAR", "Loadout", _Request select 5]] call _Database; Share this post Link to post Share on other sites
56Curious 23 Posted February 10, 2018 I used this so I could atleast get a starting point for it as well, forgot to mention :P http://www.armaholic.com/forums.php?m=posts&q=35771 Share this post Link to post Share on other sites
gc8 977 Posted March 10, 2018 @code34 can you save the ini file in mission folder or only only in the addon folder? Share this post Link to post Share on other sites
code34 248 Posted March 10, 2018 by default, it s only in the addon folder Share this post Link to post Share on other sites
gc8 977 Posted March 10, 2018 2 hours ago, code34 said: by default, it s only in the addon folder So it can be changed? Share this post Link to post Share on other sites
code34 248 Posted March 10, 2018 yes look at ligne 55 : https://github.com/code34/inidbi2/blob/master/inidbi2/inidbi2.cs string mypath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\db\\"; 1 Share this post Link to post Share on other sites
gc8 977 Posted March 11, 2018 12 hours ago, code34 said: yes look at ligne 55 : https://github.com/code34/inidbi2/blob/master/inidbi2/inidbi2.cs string mypath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\db\\"; That's great, any change you could add script command that changes the path? Or maybe command that toggles between execute location and mission location? 1 Share this post Link to post Share on other sites
code34 248 Posted March 13, 2018 It s a design choice to not permit those kind of operations at sqf level cause it can lead to override by mistake some files. Everybody who want, can do it at the dll level with his own modifications from the original source. You just have to edit it in visual studio community and recompile it as 64bits exe. But you can not write directly some datas into your pbo without unpack it. Share this post Link to post Share on other sites
griesgram 10 Posted April 3, 2018 this here script works fine in singleplayer.... it also work on my dedicated server, the problem is only, that it writes the database on the machine of the player, not on the server. What could i be doing wrong? _uid = getPlayerUID player; _inidbi = ["new", "creditsDB"] call OO_INIDBI; _existing = ["read", ["section", _uid, 0]] call _inidbi; _check = _existing; if (_check == 0) then {["write", ["section", _uid, 80]] call _inidbi; hint format ["%1 bananas", 80] } else {hint format ["%1 bananas", _check]}; Share this post Link to post Share on other sites
code34 248 Posted April 4, 2018 hi griesgram how do you check the script work dedicated server ? you should check if inidbi addon is well loaded with the version command check also -servermod= on server start parameters :) Share this post Link to post Share on other sites
gc8 977 Posted April 12, 2018 @code34 Hey It's me again. I was thinking could you make it so that the inidb2 uses loadfile script command to load the db file even from inside of pbo? Because loadfile can do this. Also it would be great if you could set the db save path to your mission folder, then you don't have to ask everyone who plays your mission to drop the db file to inidb2 addon folder. But the db file would packed in to the mission pbo once mission is exported. is this possible? thx for your great work code34! Share this post Link to post Share on other sites
Dedmen 2703 Posted April 13, 2018 On 12.4.2018 at 10:53 AM, gc8 said: @code34 Hey It's me again. I was thinking could you make it so that the inidb2 uses loadfile script command to load the db file even from inside of pbo? Because loadfile can do this. Also it would be great if you could set the db save path to your mission folder, then you don't have to ask everyone who plays your mission to drop the db file to inidb2 addon folder. But the db file would packed in to the mission pbo once mission is exported. is this possible? thx for your great work code34! no loadFile cannot do this. loadFile is made to handle text. Not binary files. It will stop on a null char. But inidb could directly parse the pbo and load the DB from it. Share this post Link to post Share on other sites
gc8 977 Posted April 13, 2018 22 minutes ago, Dedmen said: no loadFile cannot do this. loadFile is made to handle text. Not binary files. It will stop on a null char. But inidb could directly parse the pbo and load the DB from it. I did not mean loadfile would load the pbo... but a text file packed in the pbo like so: _str = loadFile "test.txt"; I tested this with exported mission and it worked, the contents of the file were successfully returned. :) Share this post Link to post Share on other sites
Dedmen 2703 Posted April 13, 2018 2 hours ago, gc8 said: I did not mean loadfile would load the pbo... but a text file packed in the pbo like so: _str = loadFile "test.txt"; I tested this with exported mission and it worked, the contents of the file were successfully returned. :) Ooohh. Inidb uses ini files.. who would've thought I better go and get some sleep. Forget that I was here ;) Share this post Link to post Share on other sites
code34 248 Posted April 13, 2018 @gc8, i don't understand what you expected to do. You can't write into a pbo file. Like i said before you can custom yourself your path from c# source. What is your goal ? Share this post Link to post Share on other sites
gc8 977 Posted April 13, 2018 (edited) 42 minutes ago, code34 said: @gc8, i don't understand what you expected to do. You can't write into a pbo file. Like i said before you can custom yourself your path from c# source. What is your goal ? Not write into pbo... write to unpacked mission folder. and read from it (pbo or unpacked). :) that way when someone wants to play your mission they don't have to drop the .ini files to inidb addon folder. But the .ini can be readed directly from the mission file. Edited April 13, 2018 by gc8 ini Share this post Link to post Share on other sites
code34 248 Posted April 14, 2018 ok but what is the goal of this ? What is the benefit ? ini file should be read / write by application or developpers not by users. this has been configured this way to prevent security issues, and prevent users from overwriting files elsewhere Share this post Link to post Share on other sites
gc8 977 Posted April 14, 2018 24 minutes ago, code34 said: ok but what is the goal of this ? What is the benefit ? The benefit is that you can publish your mission with the .ini file in the pbo so that user wont have to install the ini file separately. 24 minutes ago, code34 said: this has been configured this way to prevent security issues, and prevent users from overwriting files elsewhere If inidb saves only files with .ini extension then it can't overwrite anything important. Share this post Link to post Share on other sites
code34 248 Posted May 8, 2018 Finally, gc8 has added the feature to his version. I invite you to contact him if you need more information. Share this post Link to post Share on other sites