Jump to content

torndeco

Member
  • Content Count

    312
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by torndeco


  1. Hi,

    [updateWanted]
    ;;                                                        1                      2                                                 3
    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;
    SQL1_INPUTS = 1-String, 2, 3
    
    Number of Inputs = 3

    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;


  2. @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.


  3. $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)


  4. 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


  5. 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.


  6. 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..


  7. 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


  8. 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.


  9. 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


  10. i'm using the latest altis life script and the latest extdb files.
    In fact i'm just trying to use extdb2 for my personal usage, maybe to make a little mission (?)

    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

    I'm 100% a script kiddy

    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.


  11. 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 :)


  12. 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.


  13. 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


  14. @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.


  15. 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.


  16. 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..


  17. 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.


  18. 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.


  19. 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


  20. @.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.


  21. Could you elaborate? Extreme Pudding Mix are charging for the reserved slots.

    Am just curious, since i can't quiet grasp if this is meant as something that is acceptable or not under the new server monetization rules.

    Since the rules declare its either either fully open or closed off and don't directly mentioned reserved slots.

    My personally 2 cents its about the only decent + fair way for server administrators to raise funds.

    Once its limited to like around 5-10% of total slots to the server.

    The only issues really is its not always clear why a player is getting kicked.

    Also would be alot better if reserved slots were integrated into the game itself.


  22. Would appreciate a forum moderator just locking this thread.

    extDB in its current state is dead

    If i do release a new version of extDB, more than likely will be some changes...

    I will post a new thread if i do go that route.

    Also while you are perfectly free to fork extDB etc... please make up your own thread.

    edit: Also if you do fork extDB etc, please rename the extension to avoid confusion with users and pay attention to the license for the code in question.


  23. extDB Repo is currently private atm

    -------

    There was abit of fuss over someone posting a thread asking for extDB donations on Altis Life RPG forums, wasn't even me.

    Thread was removed / hidden due to fact it was to donations for myself / extDB development and wasn't against a forum Rule (i checked).

    So it was directed at me over me not actively supporting Altis Life RPG mission anymore

    Mainly due to me not wanting to be associated with a RPG Mission with Rape / Attempted Rape in code for crimes etc..

    While i talked to Tonic quickly over the issue

    I have made extDB repo private while i decide what i will do

    Do nothing

    Code Changes to Drop Altis Life RPG Support

    Even a License Change (not preferred)

    Donations only came up in Issue Tracker due to Linux Server Costs & Server Renewal was coming up.

    There is no finance reason to pay for a server just for working on an extension i wasn't using.

    Donations would go towards paying for Dedicated Server costs, so i would do continue todo development work on extDB.

    I even mentioned i would more than likely come back regardless anyways after Arma 2017 Release.

    -------

    Anyway don't worry for the 2 people that donated. (Same person donated twice thank you)

    I should have it backup up in 48 Hours or i will return your donations.

    Upcoming updates if i do continue are

    1) Apache Thrift Support for remote server script execution

    2) Support for Dynamic SQL Statements in DB_CUSTOM_V5 (mainly for A3Wasteland)

    If you have issues or questions that are not Altis Life RPG related send me a message on forums and i am sorry about the inconvenience.

×