Jump to content

torndeco

Member
  • Content Count

    312
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by torndeco

  1. @Yourry You could try catch me on Skype, i tend to check there for messages. For playername you can use SQL1_INPUTS = 1-STRING This way playername is wrapping quotes inside the Database when it gets stored. Or OUTPUT = 1-STRING That way playername is only wrapping in quotes when the data is fetched. Plus no quotes are stored in the database itself. ---------------- SQLite apparently doesn't support IF statements. You have afew different ways you could try solve the problem, by using either of the following functions instead. SELECT + Just code SQF code to check if the result/array is empty. or CASE or http://stackoverflow.com/questions/418898/sqlite-upsert-not-insert-or-replace/4330694#4330694 or COUNT or select exists( select 1 from "Player Info" where Name = 'abc' ); If you use "COUNT" or "SELECT exists" method it will return a number then you can combine that with "OUTPUT=1-BOOL". This will convert the result 0 = false 1+ = true ---------------- Lastly if you need Realtime logging edit extdb-conf.ini [Log] Flush = true
  2. @Yourry Lose the Prepared Statement Cache = false That just an option for when you only run the SQL Statement i.e @ server startup for loading objects / vehicles etc Or if your testing + altering the Database Scheme while the server is running. Use the following [Default] Prepared Statement Cache = false Otherwise the statement will fail if its cached + the scheme has changed. Note it will work fine after it has failed, since the cached prepared statements get wiped when they encounter an error. ------------------- Anyway the errors extDB report back to SQF are generic error messages. You need to look @ extDB2/logs to see detailed info on whats its complaining about.
  3. @Yourry [playerInfoInsertOnDB] SQL1_1 = INSERT INTO players_save ($CUSTOM_1$,$CUSTOM_2$) VALUES (?,?); Number of Inputs = 4 Number of Custom Inputs = 2 SQL1_INPUTS = 3, 4 OUTPUT = 1-STRIP-STRING, 2-STRIP-STRING, 3, 4-STRING Change to [playerInfoInsertOnDB] SQL1_1 = INSERT INTO players_save ($CUSTOM_1$,$CUSTOM_2$) VALUES (?,?); SQL1_INPUTS = 1, 2 Number of Inputs = 2 Number of Custom Inputs = 2 Note there is no OUTPUT for INSERT SQL Command --------- Also when you are passing info to extDB2 the order is <inputs>:<custom inputs> _result = [format["playerInfoInsertOnDB:%1:%2:%3:%4", "PlayerUID", "Name", _playerUID, _playerName], 1, true] call extDB_fnc_async; Change to _result = [format["playerInfoInsertOnDB:%1:%2:%3:%4", _playerUID, _playerName, "PlayerUID", "Name"], 1, true] call extDB_fnc_async; --------------- Its not possible to reload / unload Protocols atm Personally i type the commands into a text editor like 9:ADD_DATABASE:....... 9:ADD_DATABASE_PROTOCOL:............... 0:.............<command to test> Then you can just paste the entire thing into the test application to test out the command. ---------- Post added at 23:17 ---------- Previous post was at 22:37 ---------- Version 49 Just mainly a bug fix release + some new options for SQL_CUSTOM SQL_CUSTOM Notes Version number = 9 You will need to changed "Strip Custom Input Chars" -> "Strip Custom Chars" This was due to typo were code was checking for "Strip Custom Input Chars", but documentation + examples were using "Strip Custom Chars". Bumped version number, so people will be sure they are using the correct option in there sql_custom.ini file. -Vac_SteamID / -VacBeGUID These new SQL_CUSTOM Options will use playerUID / steamID to check for Vac Bans depending on extDB-conf settings. Should be usefully when saving / retreiving playerinfo from database etc. It is the same as using STEAM Protocol, except that it doesn't return any values and saves you from using doing a seperate callExtension. Changes v49 FIXED: SQL_CUSTOM: Strip Custom Input Chars -> Strip Custom Chars UPDATED: SQL_CUSTOM version = 9 . Changes v48 ADDED: SQL_CUSTOM: Support for loading multiple sql_custom.ini files ADDED: SQL_CUSTOM: Vac_SteamID + Vac_BeGUID Options FIXED: Loading MISC + LOG Protocols Downloads https://github.com/Torndeco/extDB2/releases
  4. Wrong bind parameters count means MySQL was expecting different number of bind values (?) than it got For the above extDB2 sent it 3 bind values 1-String,2,3 But your SQL Prepared Statement only had 2 bind values (?) not 3 The mistake is you wrapped in ? in quotes, so instead of using a bind value MySQL thinks your you mean the character/string ? To fix it use SQL1_1 = UPDATE playerstates b, player a SET b.crimes = ? WHERE a.playerUID = ? AND a.playerID = b.playerID AND b.fraction = ? AND b.alive = 1;
  5. @Tisor It will return empty string i.e "" not [1,""] Have a look @ https://github.com/Torndeco/extDB2/blob/master/examples/sqf/fn_async.sqf#L43 I would recommend you use fn_async + just change SQL_CUSTOM_ID to whatever you are using. https://github.com/Torndeco/extDB2/blob/master/examples/sqf/fn_async.sqf#L23 -------------- Also try out the test application, can make it easier to see what is happening aswell without having to start arma.
  6. $Custom_X$ is for dynamic inserting text into SQL Statement i.e what A3Wasteland does with DB_CUSTOM_V3 An example if sql_custom file using $CUSTOM_x$ @ https://github.com/Torndeco/ArmA3_Wasteland.Altis/blob/Development_main/sql_custom/a3wasteland.ini Hopefully the above changes will get merged into offical A3Wasteland soon. -------------------------------------------------------------------------- DB_CUSTOM_V5 + SQL_CUSTOM uses prepared statements that are cached. With Prepared Statements, only the value can change in the sql statement you can't have SQL1_1 = SELECT ? FROM ServerObjects WHERE ServerID = ? AND MapID = ?; To workaround this SQL1_1 = SELECT $CUSTOM_1$ FROM ServerObjects WHERE ServerID = ? AND MapID = ?; Also when calling extDB2 the order of inputs are <inputs>:<custom_inputs> --------- The downsides to using $Custom_x$ is its less secure and the prepared statement isn't cached. If you were previous using DB_CUSTOM_V5 you can don't need to worry about $CUSTOM_x$ Also $CUSTOM_x$ was only added in extDB2 --------- Btw the version number increase could be a simple as new feature or a single bug fix... so 16 versions later might not mean to much :) If you need a hand updating from extDB -> extDB2 give me a shout on Skype, other main change is preventing segfaults when database connection is dropped (timing issues)
  7. Version 47 First of all thanks for MaHuja, for taking the time to look over some extDB2, and pointing out some issues + fixes. Code for generating Unique ID code is alot simpler and faster now Redis support added (ASYNC only atm) . Changes: version 47 ADDED: REDIS_RAW Protocol ADDED: SQL_CUSTOM: BOOL Option UPDATED: Improved UniqueID Generator Code KNOWN ISSUES: There is no exceptional handling for Redis atm, so if loses connection will crash extension. Changes: version 46 FIXED: Windows Lockup Changes: version 45 FIXED: SQL_CUSTOM: Return ID FIXED: SQL_CUSTOM: Callname: Prepared Statement override FIXED: Logging Options + Updated Code Downloads https://github.com/Torndeco/extDB2/releases
  8. torndeco

    Arma 3 Server monetization

    Small recommendation, it might be worth making a standard format for listing server ip's, or a seperate file with server ip listings. Currently its a mixture of server ip / text description of server + ip / webpage link. That way in the future when/if the list gets bigger. It will be possible to make an application that grabs the list of allowed servers + checks them against steam server browser. Would make it slight bit easier for addon creators to check that servers on Monetization have permission from themselves, without having to check every link manually.
  9. Just a small heads up coming changes for next version, should be out in the next day or 2. SQL_CUSTOM Bool Option - done SQL_CUSTOM Date Option - not done yet (i.e return date in arma array format, will allow people to localize it etc) Redis Support - nearly done For people building from source code on Linux, CMakefiles have been updated to build static version, old Makefiles has been removed. Also thanks for https://github.com/MaHuJa for taking the time to go through extDB2 code + fixing / improving the code for example the Unique ID generator..
  10. The code is complete, i just not walking every single person through building it from source code. 1)Poco Library will not build as static unless you disable testsuite 1a)Poco Library Custom Changes will more than likely break the testsuite (i never updated them) 2)extDB2 will not build without the custom Poco Changes i added, (noidea why you would expect it would compile without them) 3)Makefile is slightly outof data, you update the filenames etc, that got renamed... (its a minor change) 3a)Look @ cmake build files if you get confused... Also extDB2 binary does not work on Debian 7.5 due to Glibc + librt changes. Thats why Linux Requirements mention Debian 8 not 7
  11. Just use the static builds... Anyway your problem is you can't build the testsuite when compiling Poco as a Static Library. As such i never bothered to check if any of my changes break the testsuite aswell. Also i don't provide support for compiling from source code... Its harsh but most people build from source code just because they can and not for a valid reason.
  12. torndeco

    theres got to be a fix for ai soon i hope

    Try out http://forums.bistudio.com/showthread.php?187450-VCOM-AI-Driving-Mod
  13. Version 44 Just some bugfixes, main things of note is RCON Whitelisting allowed commands is now working correctly. Also the setup commands got changed slightly, should only take afew seconds to update... Had some bad logic in the code, best solution was to split up the Protocols + Database Protocols into different commands. Renamed the commands aswell, so it easier for new person to understand them at a glance. 9:ADD_DATABASE:<DATABASE> 9:ADD_DATABASE:<DATABASE>:<DATABASE_NAME> 9:ADD_PROTOCOL:<PROTOCOL>:<PROTOCOL_NAME> 9:ADD_PROTOCOL:<PROTOCOL>:<PROTOCOL_NAME>:<OPTIONS> 9:ADD_DATABASE_PROTOCOL:<DATABASE_NAME>:<PROTOCOL>:<PROTOCOL_NAME> 9:ADD_DATABASE_PROTOCOL:<DATABASE_NAME>:<PROTOCOL>:<PROTOCOL_NAME>:<OPTIONS> Also Updated the wiki documentation, was slightly outof date. https://github.com/Torndeco/extDB2/wiki Changes: version 44 FIXED: RCON Whitelisting Commands (still need to fixup ability to whitelist #exec commands fully) CHANGED: System Commands, Logic was broken slightly should only take afew seconds to update sqf code Changes: version 43 FIXED: Re-added [1] Return for 1: for simplier fn_async code Changes: version 42 FIXED: SQL_CUSTOM BEGUID Option Downloads https://github.com/Torndeco/extDB2/releases
  14. Altis Life RPG is using extDB, extDB2 is not compatible outof the box... There is noway anyone would get stuck on what you did if they had either 1) Made a mission from scratch 2) Or updated Altis Life RPG code to use extDB2 --------- That very thing you are stuck on is to make script hacks slightly harder to write. Not to mention you were also releasing script for people to use on Altis Life RPG Servers 2 days ago You even referred to yourself as Now you want to learn how to use extDB directly with an example of deleting player info. I find that very hard to believe its not for a hack script to use on someone elses server. --------- Note: I personally have no problems with people having accounts on either forums etc, would get hard to police anyways. Besides even just reading the different methods people for hacking is interesting. I am just not going to start helping people that are releasing scripts to use for script kiddies to use on servers.
  15. The original post is the same username as one on a known cheats/scripting forum for arma3. That is currently working on some scripts to be used on AltisLifeRPG Servers. So i rather not point out the mistakes the original poster is making, especially when it looks like they are trying to delete database entries. But it is nice to see that feature for extDB is slightly confusing for some script kiddies :)
  16. Version 41 Very Important If you enable RemoteTCP block the port from outside access. I still need to code to blacklist / whitelist IPs, atm clients can brute-force guess the password fairly easy. Also the password is send in the clear atm... Changes: version 41 ADDED: Remote Raw TCP communicate with extDB2 FIXED: Missing ] from SQL_RAW when query result was empty Downloads https://github.com/Torndeco/extDB2/releases -------------- RemoteTCP Connection: Is a new feature to send messages directly to extDB2. 9:START_REMOTE:RemoteAccess This starts RemoteTCP using "RemoteAccess" settings in extdb-conf.ini. Now you can use a client like Putty/Kitty http://www.9bis.net/kitty/ Select IP/Port etc... for Connection Type Select RAW If successful you will see a Password: Enter the password you configured in extdb-conf.ini, note this password is currently sent in plain text. You will get 3 attempts Type #START <INSERT CODE> <INSERT CODE> <INSERT CODE> #END #SEND ----------------------------- SQF / Arma Engine side Once the code / text has been #SEND You can retreive it by _result = "extDB2" callExtension "6:0"; The result will be in either in these formats <TCPClientID>:<TEXT> or <UniqueID> If you get back just a UniqueID you will need to use 5:<UniqueID> to retreive the information. With the TCPClientID you can also send text back to the TCPClient via "extDB2" callExtension "7:<TCPClientID>:<TEXT>"; ------------------ Possible uses include, Admin Webpage that sends extDB2 SQF Code to execute. Ability for Admin to test out executing code on a server without having to add exceptions to remote execute code sent from clients. I will try and get around to writing up some SQF Examples later on.
  17. Version 40 Mainly a bug fix release for when Database Connection is lost. Also added support for dynamic text in SQL_CUSTOM i.e $CUSTOM_X$ Updated Wiki with an example... Important extDB2 now checks extdb-conf.ini for correct version. It will kill server if the config file has wrong version, added check due to upcoming changes. Changes: version 40 UPDATED: Disabled Console Logger in Normal Builds FIXED: Crashes when Database Connection fails during Fetching Result Info Changes: version 39 ADDED: Added Version Check for extdb-conf.ini ADDED: SQL_CUSTOM Dynamic SQL via $CUSTOM_x$ UPDATED: Disable all Console Output for normal builds UPDATED: SPDLOG Logging Code, Linux using SPDLOG_CLOCK_COARSE FIXED: Steam VAC Auto Bans, now sends loadBans FIXED: More SQL_CUSTOM Fixes for Database Exception Handling Downloads https://github.com/Torndeco/extDB2/releases
  18. @spitfire007 http://www.altisliferpg.com/topic/9380-respect-owed-to-where-it-is-due/ Repo was private for like 4 days, not gonna get dragged into this debate again. Regardless this project is GPL'ed and still is GPL'ed. At one point i was considering dropping some code + license change. Or if you are talking about Altis Life RPG Array Option, which got removed in extDB2. It was never needed i.e look @ example 2 https://community.bistudio.com/wiki/String I removed afew features that weren't needed anymore @XoO You really should use https://github.com/Torndeco/extDB2/blob/master/examples/sqf/fn_async.sqf So it would be _query = format["getPlayerName:%1", _uid]; [_query, 2] call fn_async; 2=ASYNC + Return Result 1=ASYNC, + no return result... i.e for Database updates 0=SYNC updates, will block till its done. Personally i recommend you just use 2 instead, so you aren't blocking the arma engine. ----------- For example in your code you forgot to compile the result. callExtension returns a string Since it was a string your if statement was checking the first character if it was an integer 0. Thats why you get the error about expression, you were comparing a string to an integer. So you forgot to call compile the string so it would turn into an array. ---------- Just use fn_async its got the logic in place already for waiting / errors / multi-part messages.
  19. https://github.com/Torndeco/extdb/wiki/Setup:-Linux-Static-Build Only way you can mess up is not install 32bit version of tbb2 or file permissions There is also a test program for extDB you can try run to see what happens.. Otherwise its the exact same as windows install.
  20. extDB2 Version 37 Released Updated First Post If a forum moderator reads this, can they change title from extDB->extDB2 thanks. Info: First Official Release of extDB2 https://github.com/Torndeco/extDB2/releases Went over all the code, some stuff got removed / improved on. Due to the changes extDB2 is not back compatible, but it is very similiar. So it shouldn't require much work, just really some sqf changes. The only exception is A3Wasteland Servers would need to update db_custom_v3 -> sql_custom file. Its very similar to DB_CUSTOM_V5 but it also supports Dynamic SQL Insertion aswell. Main advantages are 1) Performance changes in code, but prob won't be noticeable. Didn't benchmark 2) SQL_CUSTOM can return InsertID 3) SQL_CUSTOM can add Dynamic Text to Statement Fixes Couple of separate fixes for handling Database Connection Lost, some in extDB2 / Poco + MySQL Code. So if you do compile from Source make sure you use the supplied changes. Note: Documentation of changes / new features are still currently a work in progress. Also i will have Linux Builds Uploaded later today.
  21. extDB2 Debug Test Build is Now Available @ https://github.com/Torndeco/extDB2/releases extDB2 will require changes to SQF Code. As the syntax for Add Protocols etc has changed slightly So has the return result string aswell Have a look @ https://github.com/Torndeco/extDB2/tree/master/examples/sqf https://github.com/Torndeco/extDB2/wiki https://github.com/Torndeco/extDB2/wiki/Known-Issues https://github.com/Torndeco/extDB2/wiki/Changes-from-extDB Might be typos etc... Still in progress updating repo + wiki etc... ------------ Recommend you only use this for test release to test out updating SQF Code on a test server etc..
  22. torndeco

    Arma 3 Server monetization

    If it comes down to people concerned over if BIS would take people to court etc.. Have a look @ what Starve Together Did with regards to Dedicated Servers. 1)Dedicated Servers don't require to purchase a game. 2)Dedicated Servers require a player token. Its generated by launching the game into console + typing a command for a unique token. 3)The token basicly links a player account with the game purchased to the server. --------------- If BIS did a similar solution, they could start blacklisting Servers from Steam Browser / BattlEye that break the server Monetization Rules. Just by banning the player token from being allowed to run a server. Of course it may require changes to game EULA etc... but BIS could start to remove / ban servers etc... Yes they will be prob pirated servers at some point etc, but it will atleast it will reduce the problem. Still requires people to actively report Servers that are breaking the rules. But it is still better than current scenario Anyway its just an idea.
  23. I still have all the original stuff, like i just made the repo was just made private for afew days. While i was considering what i was going todo inregards to future of the project. Infact the old repo is up on https://github.com/Torndeco/extdb_old Now please have some respect and move all discussions of forks to another thread. All you will accomplish by posting in here about a fork, is i won't release extDB as opensource anymore.
  24. Last time keep please keep discussion about forks etc in your own thread thank you. This thread is purely for discussion for extDB, Altis Life RPG has their own forums for supporting people. Also thanks for picking a name that will confuse people *sigh* For people confused over why repo got pulled down you can read links @ http://forums.bistudio.com/showthread.php?179727-extDB-(arma3-extension-linux-windows)&p=2879754&viewfull=1#post2879754 http://www.altisliferpg.com/topic/9380-respect-owed-to-where-it-is-due/ Like i said anyone that is inconvienced by this can PM me once its not related to Altis Life RPG etc... edit: Update, new version is coming along nicely. Overhaul of code is coming along nicely, even improved the performance of Unique IDs. edit2: Old Repo is up @ https://github.com/Torndeco/extdb_old
  25. torndeco

    Arma 3 Server monetization

    @.kju Ahh thanks for copying/pasting the text etc... Must have misread it the first time i looked over it. I was under the impression it was either fully locked access like A3L pulled with donations or fully public servers. Anyway hopefully BIS will revisit the Server Admins (+ not Modders) beening allowed to add advertisements + make money off non-gameplay effecting items. As it seems awfully in the Admins favour, when Modders are the ones who do most of the work. But to be honest most Modders will have No Comercial License Agreements anyways, so that just leaves standard arma content.
×