Page 10 of 30 FirstFirst ... 6789101112131420 ... LastLast
Results 91 to 100 of 292

  Click here to go to the first Developer post in this thread.  

Thread: Arma2MySQL

  1. #91
    https://github.com/firefly2442/Arma2NETMySQLPlugin

    Updated. Shows version number of Arma2NET that it is compiled with. Fixed so it works with the latest version of the MySQL Connector (6.5.4). Also works with latest Arma2NET (1.10). I think there were some problems and bug fixes related in this Arma2NET release because I never could get it to work with Arma2NET 1.9

  2. #92
    Sergeant
    Join Date
    May 11 2011
    Location
    Christchurch, New Zealand
    Posts
    137
    Didn't know that was what you were after - Bridge.Version dynamically returns its version, not the version that you compiled against. I will have a look at adding this for the next version.

  3. #93
    Ahh ok, I guess I'm unsure how C# deals with libraries (whether they're statically linked in or dynamic).

  4. #94
    Small fix pushed for logging data correctly.

  5. #95
    Fixed duplicate entries in database. Pushed to git repo.

  6. #96
    Added ability to run straight MySQL commands. Please test though, I'm not quite sure how well this will all work for returning multi-row results. Also added length check given the technical constraint of the callExtension method:

    http://community.bistudio.com/wiki/E...considerations

  7. #97
    Gunnery Sergeant armatech's Avatar
    Join Date
    Jan 11 2007
    Location
    United Kingdom
    Posts
    505
    hi mate thought i should post this error on here for you

    06/25/2012 09:32:43 Log: Unmanaged side loaded
    06/25/2012 09:32:43 Info Successfully loaded into process arma2oa
    06/25/2012 09:32:43 Info Arma2NET 1.11.0.0 initializing on CLR 4.0.30319.269
    06/25/2012 09:32:43 Info Sandboxing is disabled
    06/25/2012 09:32:43 Info Rebuilding addin store
    06/25/2012 09:32:43 Info Finding addins
    06/25/2012 09:32:43 Info Found addins: Arma2NETMySQL, Arma2NETMySQLCommand, Activate, IsFunction, Deactivate, _Empty, VersionOfAddIn, CompareVersion, ClrVersion, Version, Functions, CommandLine, DateTime
    06/25/2012 09:32:43 Info Activating base addins
    06/25/2012 09:32:43 Info Activated Activate from BaseFunctionsPlugin.Activate, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated IsFunction from BaseFunctionsPlugin.IsFunction, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated Deactivate from BaseFunctionsPlugin.Deactivate, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated _Empty from BaseFunctionsPlugin._Empty, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated VersionOfAddIn from BaseFunctionsPlugin.VersionOfAddIn, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated CompareVersion from BaseFunctionsPlugin.CompareVersion, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated ClrVersion from BaseFunctionsPlugin.ClrVersion, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated Version from BaseFunctionsPlugin.Arma2NetVersion, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Activated Functions from BaseFunctionsPlugin.Functions, BaseFunctionsPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e (Sandboxed: False)
    06/25/2012 09:32:43 Info Arma2NET initialized
    06/25/2012 09:32:43 Info Activated Arma2NETMySQLCommand from Arma2NETMySQLPlugin.Arma2NETMySQLPluginCommand, Arma2NETMySQLPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (Sandboxed: False)
    06/25/2012 09:32:43 Error Caught exception
    Arma2Net.Managed.FunctionNotFoundException: The function was not found. Check that the function is loaded.
    at Arma2NETMySQLPlugin.Arma2NETMySQLPluginCommand.Run (String args)
    at AddInAdapter.Arma2NetAddInAddInAdapter.Run(String args, Int32 maxResultSize)
    at HostAdapter.Arma2NetAddInHostAdapter.Run(String args, Int32 maxResultSize)
    at Arma2Net.Managed.AddIns.AddInManager.InvokeAddIn(S tring addInName, String addInArgs, Int32 maxResultSize)
    at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)

  8. #98
    Should be all straightened out with the latest code. If you find something that breaks it, let me know.

  9. #99
    Gunnery Sergeant armatech's Avatar
    Join Date
    Jan 11 2007
    Location
    United Kingdom
    Posts
    505
    ok this works
    _selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['cl2_maindatabase','SELECT * FROM useraccounts']";
    player sidechat format["done Return %1",_selectTest];
    and this fails
    _command = format["Arma2NETMySQLCommand ['cl2_maindatabase','INSERT INTO useraccounts VALUES ('',%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14 ,%15,%16,%17,%18,%19,%20)']",_myusername,_mypassword,_mycash,_mybank,_myjob,_ inv,_mywork,_isadmin,_Location,_inventory,_playeri d,_skills,_licenes,_role,_outfit,_holster,_Rholste r,_jailtime,_playtime,_DOB];
    _returned = "Arma2Net.Unmanaged" callExtension _command;
    returns false

    this might be a escape issue
    it might be a good thing to add a 3rd array eliment to escape the values so it end up as follows when quotes are used within a quote or do you consider this an end user issue?
    INSERT INTO useraccounts VALUES ('',"Biiskaps","22lcwzg7uggh","60","600","Unemploy ed","[]","[0,0,0,\"Unemployed\",[]]","False","[3617.32,14817.5,0.00146484]","[[],[]]","4297478","[0,0,0,0,0,0]","[0,0,0,0,0,0,0,0]","CIV","","[\"\",false,false]","","0","0","[19,12,1990]");
    i have tried this manually and it still returns false
    _selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['cl2_maindatabase','INSERT INTO useraccounts VALUES ("""",""Biiskaps"",""22lcwzg7uggh"",""60"",""600"" ,""Unemployed"",""[]"",""[0,0,0,\""Unemployed\"",[]]"",""False"",""[3617.32,14817.5,0.00146484]"",""[[],[]]"",""4297478"",""[0,0,0,0,0,0]"",""[0,0,0,0,0,0,0,0]"",""CIV"","""",""[\""\"",false,false]"","""",""0"",""0"",""[19,12,1990]"");']";
    player sidechat format["done Return %1",_selectTest];
    it could be done with something like this
    vb.net
    Public Function realescape(ByVal data As String) As String
    Dim ds As String = ""
    Try
    If data <> String.Empty Then
    data = data.Replace(Chr(34), "\" & Chr(34))
    Else
    Return ""
    End If
    Return data
    Catch ex As Exception
    Return data
    Finally
    End Try
    End Function

  10. #100
    Hmm, yeah quotes and stuff probably should be handled client/user side. Otherwise then it starts getting really hairy.

    If it's returning false, I think that means there's a problem with the MySQL statement. If you can't run the straight command via phpmyadmin or via the commandline or something then you need to check it.

Page 10 of 30 FirstFirst ... 6789101112131420 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •