code34 248 Posted November 3, 2013 (edited) iniDBI(IMPROVED) - A simple server-side database extension using INI files inidbi is not supported anymore, you can use now inidbi2: https://forums.bistudio.com/topic/186131-inidbi2-save-and-load-data-to-the-server-or-your-local-computer-without-databases/ Authors: inidbi - v1.4 code34 - nicolas_boiteux@yahoo.frinidbi - v1.3 code34 - nicolas_boiteux@yahoo.frinidbi - v1.2 code34 - nicolas_boiteux@yahoo.frinidbi - v1.1 code34 - nicolas_boiteux@yahoo.frinidb - v1.0 SicSemperTyrannis http://raiderbattalion.enjin.com/iniDBI is a fork of the iniDB project. Download:https://www.dropbox.com/s/d9cyw7wgbh9xuqb/%40inidbi.zipHowto install inidbi in video: Mission example using read & write Inidbihttps://www.dropbox.com/s/np91uw8d1cnrci4/test_mission.altis.zipGithub:https://github.com/code34/-inidbiREADME: iniDBI(IMPROVED) - A simple server-side database extension using INI filesAuthors:inidbi - v1.4 code34 - nicolas_boiteux@yahoo.frinidbi - v1.3 code34 - nicolas_boiteux@yahoo.frinidbi - v1.2 code34 - nicolas_boiteux@yahoo.frinidbi - v1.1 code34 - nicolas_boiteux@yahoo.frinidb - v1.0 SicSemperTyrannis http://raiderbattalion.enjin.com/How to use:To use "iniDBI" in your mission, install the extension in your ARMA2 or ARMA3 directory by copying the entire "@inidbi" folder included in the download to your root directory.Don't forget to copy over over or create the /db/ folder.It should look like: /Arma 3/@inidbi/iniDB.dllIt should look like: /Arma 3/@inidbi/db/It should look like: /Arma 3/@inidbi/Addons/inidbi.pboThen in your mission init.sqf, somewhere before you want to use the functions do this:call compile preProcessFile "\inidbi\init.sqf";It should be noted that when you install the @inidbi folder you can delete the /examples/ directory from there if you please, they serve no purpose in that folder.You have permission to use, upload or otherwise distribute this as please, just mention differents authors.----------------------------------------------------------------------------------------------CHANGELOG14-Decembrer-2013 - inidbi- add deletesection feature- fix buffer size12-December-2013 - inidbi- fix string serialize16-November-2013 - inidbi- check input/output data type- add log messages01-November-2013 - inidbi- increase buffer 8k- check size of written data- change output function13-March-2013- Module- Initial Release- init.sqf- Initial Release DOCUMENTATION: v 1.4 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.frv 1.3 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.frv 1.2 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.frv 1.1 : iniDBI(IMPROVED) by code34 - nicolas_boiteux@yahoo.frv 1.0 : IniDB by SicSemperTyrannis http://raiderbattalion.enjin.com/Function: iniDB_versionUsage: diag_log call iniDB_version;Output: the dll version and addon version----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_existsUsage: "myDatabaseFile" call iniDB_exists;Output: true if the database exists as a file, false otherwise----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_deleteUsage: "myDatabaseFile" call iniDB_delete;Output: true if the file was deleted successfully, false otherwiseNotes: If you are concerned about security, you can recompile the PBO/DLL without this function.----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_deletesectionUsage: [databasename, section] call iniDB_deletesection;Output: true if the section was deleted successfully, false otherwise----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_readPrototype: [databasename, section, variablename, ("STRING"|"ARRAY"|"SCALAR")] call iniDB_read;Usage: ["myDatabaseFile", "sectionname", name player, "STRING"] call iniDB_read;Usage: ["myDatabaseFile", "sectionname", "position", "ARRAY"] call iniDB_read;Usage: ["myDatabaseFile", "sectionname", "health", "SCALAR"] call iniDB_read;output: datainidb_errno: true if read succeed, false if read faileddata: data return type depends of fourth parameter function. Return empty array, string, or 0, if not setNotes: fourth parameters musts exist (not like in iniDB where it is optionnal)----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_writePrototype: [databasename, section, variablename, value] call iniDB_read;Usage: ["myDatabaseFile", "sectionname", "position", position player] call iniDB_write;Usage: ["myDatabaseFile", "sectionname", "health", 100.0] call iniDB_write;Usage: ["myDatabaseFile", "sectionname", "name", profileName player] call iniDB_write;Output: true if the write succeeds, false otherwise.Notes: The fourth parameter is assumed to be a string, array or number (scalar). If it is not, it will save as a string by default. This function automatically derives the type by the variable passed.Please avoid saving strings or data with the character ' in it, it is an expected bug, but untested.---------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_CRC32Usage: diag_log "SicSemperTyrannis" call iniDB_CRC32;Output: "204E6A8B"Notes: This is a standard implementation and will match PHP and various other languages.----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_MD5Usage: diag_log "SicSemperTyrannis" call iniDB_MD5;Output: "ee89b42582c546fe47d17b14f6331bff"Notes: This is a standard implementation and will match PHP and various other languages.----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_Base64EncodeUsage: diag_log "SicSemperTyrannis" call iniDB_Base64Encode;Output: "U2ljU2VtcGVyVHlyYW5uaXM="Notes: This is a standard implementation and will match PHP and various other languages.----------------------------------------------------------------------------------------------------------------------------------------------Function: iniDB_Base64DecodeUsage: diag_log "U2ljU2VtcGVyVHlyYW5uaXM=" call iniDB_Base64Decode;Output: "SicSemperTyrannis"Notes: This is a standard implementation and will match PHP and various other languages. You can save and load data persistently for your mission. Save money for players, inventories, etc. This is meant for servers but it could be used for clients, too.The PBO (SQF) and C++ source is included. Have fun. Edited November 22, 2015 by code34 Share this post Link to post Share on other sites
Guest Posted November 3, 2013 Release frontpaged on the Armaholic homepage. iniDBI v1.1 ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future 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
gagi 10 Posted November 7, 2013 Nice work on this one Code34 !!! Share this post Link to post Share on other sites
code34 248 Posted November 8, 2013 thks Gagi ;) just add an HOWTO video for install inidbi: Share this post Link to post Share on other sites
gagi 10 Posted November 8, 2013 Great! When do you release the Hardcore Insurgency with inidbi support ? :) Share this post Link to post Share on other sites
Esro 10 Posted November 9, 2013 How to use: To use "iniDBI" in your mission, install the extension in your ARMA2 or ARMA3 directory by copying the entire "@inidbi" folder included in the download to your root directory. Don't forget to copy over over or create the /db/ folder. It should look like: /Arma 3/@inidbi/iniDB.dll It should look like: /Arma 3/@inidbi/db/ It should look like: /Arma 3/@inidbi/Addons/inidbi.pbo Now, add this parameter in your command line to start the game: -mod=@inidbi Then in your mission init.sqf, somewhere before you want to use the functions do this: call compile preProcessFile "\inidbi\init.sqf"; It should be noted that when you install the @inidbi folder you can delete the /examples/ directory from there if you please, they serve no purpose in that folder. This is the same solution for server dedicated ? Share this post Link to post Share on other sites
code34 248 Posted November 9, 2013 yes, it works the same way for dedicated server (only for windows server). Share this post Link to post Share on other sites
Esro 10 Posted November 9, 2013 call compile preProcessFile "\inidbi\init.sqf"; If i write that in my init mission where is the file inidbi\init.sqf ? ---------- Post added at 11:29 ---------- Previous post was at 10:51 ---------- I follow this in my dedicated server : How to use:To use "iniDBI" in your mission, install the extension in your ARMA2 or ARMA3 directory by copying the entire "@inidbi" folder included in the download to your root directory. Don't forget to copy over over or create the /db/ folder. It should look like: /Arma 3/@inidbi/iniDB.dll It should look like: /Arma 3/@inidbi/db/ It should look like: /Arma 3/@inidbi/Addons/inidbi.pbo Now, add this parameter in your command line to start the game: -mod=@inidbi Then in your mission init.sqf, somewhere before you want to use the functions do this: call compile preProcessFile "\inidbi\init.sqf"; It should be noted that when you install the @inidbi folder you can delete the /examples/ directory from there if you please, they serve no purpose in that folder. But when I launch my mission on the server he dont find inidbi\init.sqf where I can take this ! Share this post Link to post Share on other sites
code34 248 Posted November 9, 2013 call compile preProcessFile "\inidbi\init.sqf";If i write that in my init mission where is the file inidbi\init.sqf ? it is in the addon inidbi.pbo ;) Share this post Link to post Share on other sites
pawelkpl 29 Posted November 9, 2013 call compile preProcessFile "\inidbi\init.sqf";If i write that in my init mission where is the file inidbi\init.sqf ? ---------- Post added at 11:29 ---------- Previous post was at 10:51 ---------- I follow this in my dedicated server : But when I launch my mission on the server he dont find inidbi\init.sqf where I can take this ! It is not easy to add inidb mod to any mission. I try to add inidb mod to Xeno domination mission and I've managed (with help of others) to save data but can't get data to load. You need to have unpacked version of mission and find file init.sqf In that file add that line with call compile preProcessFile "\inidbi\init.sqf"; BUT as I wrote above it can not work. Share this post Link to post Share on other sites
code34 248 Posted November 9, 2013 (edited) It is not easy to add inidb mod to any mission. I try to add inidb mod to Xeno domination mission and I've managed (with help of others) to save data but can't get data to load. You need to have unpacked version of mission and find file init.sqf In that file add that line with call compile preProcessFile "\inidbi\init.sqf"; BUT as I wrote above it can not work. yes, inidbi is an addon for mission maker not an addon that save itself data of all missions. So it requires to edit mission and add some script command to works ;) Read function works well and all the time ;) if you have a problem, report a bug with the command line you use, the db.ini, etc. Edited November 9, 2013 by code34 Share this post Link to post Share on other sites
Esro 10 Posted November 9, 2013 Can you write a tutoriel for dedicated server I can't install your script for my mission... I try many solution but it doesnt work Share this post Link to post Share on other sites
code34 248 Posted November 9, 2013 Can you write a tutoriel for dedicated server I can't install your script for my mission... I try many solution but it doesnt work do you try the test mission ? ---------- Post added at 18:10 ---------- Previous post was at 17:27 ---------- update test mission for server side: https://www.dropbox.com/s/np91uw8d1cnrci4/test_mission.altis.zip Share this post Link to post Share on other sites
ben_sherman 1 Posted November 13, 2013 So I have a very larg problem here, Everything works fine on my side, BUT if a player joins my server it wont load any files or write them as it gives them error to the code, I've tried to fix this a few times now but nothing I do helps it. I've dubble checked the ini file, my saving saves writes without any problem, it wont write or load for other players besides me.... Any ideas? Error in expression <erUID player, "Account", cash] call iniDB_write; ["Data", getPlayerUID p> Error position: <iniDB_write; ["Data", getPlayerUID p> Error Undefined variable in expression: inidb_write File mpmissions\__CUR_MP.cherarus\Scripts\saveData.sqf, line 5 Seriusly? How hard can it be to answer me why it is only saving for me and not? A fix would be awesome before I kill my PC or something, it's driving me crazy it's been 48 hours now of same stupied error. I'll pay you if thats the case! Someone please tell me what is wrong and how I can fix it!! Share this post Link to post Share on other sites
code34 248 Posted November 14, 2013 So I have a very larg problem here,Everything works fine on my side, BUT if a player joins my server it wont load any files or write them as it gives them error to the code, I've tried to fix this a few times now but nothing I do helps it. I've dubble checked the ini file, my saving saves writes without any problem, it wont write or load for other players besides me.... Any ideas? Error in expression <erUID player, "Account", cash] call iniDB_write; ["Data", getPlayerUID p> Error position: <iniDB_write; ["Data", getPlayerUID p> Error Undefined variable in expression: inidb_write File mpmissions\__CUR_MP.cherarus\Scripts\saveData.sqf, line 5 Seriusly? How hard can it be to answer me why it is only saving for me and not? A fix would be awesome before I kill my PC or something, it's driving me crazy it's been 48 hours now of same stupied error. I'll pay you if thats the case! Someone please tell me what is wrong and how I can fix it!! what is the code ? and where the code is executed (server or client side) ? where the inidbi addon is loaded ? Share this post Link to post Share on other sites
code34 248 Posted November 16, 2013 (edited) 1.2 release: - check input/output parameter - add BOOL type - add log message the write function doesn't serialize anymore object type and exit with a warn message. https://www.dropbox.com/s/jxe87w2ax2k7qog/%40inidbi.zip Edited November 16, 2013 by code34 Share this post Link to post Share on other sites
Cortel 10 Posted November 17, 2013 Any plans to port this so it works on linux servers? Share this post Link to post Share on other sites
Guest Posted November 17, 2013 Release frontpaged on the Armaholic homepage. iniDBI v1.2 ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future 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
code34 248 Posted November 18, 2013 Any plans to port this so it works on linux servers? nope ;( i have no plan to port it for the moment on linux Share this post Link to post Share on other sites
Make Love Not War 10 Posted November 20, 2013 Your work is always much appreciated. Thank you! ;) Share this post Link to post Share on other sites
terrence 10 Posted December 2, 2013 (edited) Just a quick question was any work done with the dll or just the pbo? The reason im asking is im looking at upgrading my hosted server from inidb to inidbi but dont want to go threw the hassle of getting the server host to upload the new dll. Thanks Edited December 2, 2013 by terrence Fix spelling Share this post Link to post Share on other sites
code34 248 Posted December 3, 2013 yes both, the dll and addon were updated :) Share this post Link to post Share on other sites
code34 248 Posted December 12, 2013 1.3 release: - Fix string serialize https://www.dropbox.com/s/d9cyw7wgbh9xuqb/%40inidbi.zip Share this post Link to post Share on other sites
Guest Posted December 12, 2013 Release frontpaged on the Armaholic homepage. iniDBI v1.3 ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future 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