Jump to content
Sign in to follow this  
firefly2442

Arma2MySQL

Recommended Posts

Yeah, I've found out that "_pid" is coming up nil every time. I have no idea why this is happening :(

Share this post


Link to post
Share on other sites

That's the part I don't understand, I've been telling it to wait until it's not nil.. Yet it seems to continue on even though it is nil

Share this post


Link to post
Share on other sites

Hmm, I'm not sure sorry. You might want to try creating a new thread with this question, it probably would get more views. Somebody should have an idea. :)

That's the part I don't understand, I've been telling it to wait until it's not nil.. Yet it seems to continue on even though it is nil

Share this post


Link to post
Share on other sites

Hello...

Game runs fine until a command is executed to run a SQL query.

I have an issue with Arma2NETMySQL working on Windows Server 2012. I have all the Prerequisites installed.

It works on my desktop running Windows 7, but not on Windows Server 2012.

On the Windows Server 2012, arma2oaserver.exe just hangs. Doesn't say not responding but has 0% cpu utilization and players get disconnected and are unable to reconnect, (Sit at waiting for host)

I've ensured all .dll's are unblocked. I ensured the permissions on files are correct. I've tried to run the server as administrator. Nothing seems to fix the problem.

Anyone have this working on windows server 2012?

Any help on this would be greatly appreciated.

Here is logs:

Arma2NET.2014-3-20.Log:

03/20/2014 12:26:29 Arma2NET 2.3.0.0 running on CLR 4.0.30319.33440

03/20/2014 12:26:29 Loaded into process arma2oaserver

03/20/2014 12:26:29 Loading add-ins

03/20/2014 12:26:29 Domain Name Version Publisher Description

03/20/2014 12:26:29 DefaultDomain Arma2NETMySQL 0.1.0.0 firefly2442 Runs MySQL procedure commands.

03/20/2014 12:26:29 DefaultDomain Arma2NETMySQLCommand0.1.0.0 firefly2442 Runs raw MySQL/SQLite commands

03/20/2014 12:26:29 DefaultDomain Arma2NETMySQLCommandAsync0.1.0.0 firefly2442 Runs asynchronous raw MySQL/SQLite commands

03/20/2014 12:26:29 DefaultDomain ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime.

03/20/2014 12:26:29 DefaultDomain CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare.

03/20/2014 12:26:29 DefaultDomain Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

03/20/2014 12:26:29 DefaultDomain GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

03/20/2014 12:26:29 DefaultDomain SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value.

03/20/2014 12:26:29 DefaultDomain CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application.

03/20/2014 12:26:29 DefaultDomain DateTime 2.0.0.0 Scott_NZ Returns the current date and time.

03/20/2014 12:26:29 Arma2NET initialized in 00:00:00.0370166

Arma2NET.log:

03/20/2014 12:26:29 Arma2Net.Unmanaged loaded successfully

Arma2NETMySQL log:

Nothing....

Share this post


Link to post
Share on other sites

I managed to get it working now :) Only thing is, it's returning the playerid from the database as [[["78436529386389"]]] for some odd reason, is there a way to remove the [[[" and "]]] so that the id is just a number?

Share this post


Link to post
Share on other sites
I managed to get it working now :) Only thing is, it's returning the playerid from the database as [[["78436529386389"]]] for some odd reason, is there a way to remove the [[[" and "]]] so that the id is just a number?

_returnvalue = [[["78436529386389"]]]

_returnvalue = _returnvalue select 0; //_returnvalue now equals [["78436529386389"]]

_returnvalue = _returnvalue select 0; //_returnvalue now equals ["78436529386389"]

_returnvalue = _returnvalue select 0; //_returnvalue now equals "78436529386389"

_returnvalueNum = parseNumber(_returnvalue); //_returnvalueNum now equals 78436529386389

_returnvalueStr = str(_returnvalueNum); //_returnvalueStr now equals "78436529386389"

_returnvalueFormatStr = Format["%1%2",_returnvalueStr,"X"]; //_returnvalueFormatStr now equals "78436529386389X"

Edited by blckeagls

Share this post


Link to post
Share on other sites

The variable type also happens to be a string and not an array, so it doesn't work when I try this. Appreciate the help though! :)

Share this post


Link to post
Share on other sites
The variable type also happens to be a string and not an array, so it doesn't work when I try this. Appreciate the help though! :)

Pass it through PublicVariableClient

Share this post


Link to post
Share on other sites

I have a pbo running serverside that gets a bunch of stuff (also playerID) from the DB, then the script does (_sql being what is returned from the query):

_sql = call compile format["%1", _sql];

and it returns it BIS_fnc_MP to the client,

and on clientside it just compares it straight away.

if((getPlayerUID player) != (_session select 0)) exitWith {}; //Data didn't match.

Has always worked fine...

Source: Tonic's Altis Life RPG

Edited by Profecy

Share this post


Link to post
Share on other sites

The problem is that it's returning unwanted characters that shouldn't even be in there, and are not in the database

Share this post


Link to post
Share on other sites

_sql = call compile format["%1", _sql];

Source: Tonic's Altis Life RPG

That line parses the returned string from mysql into an Arma array.

for Instance:

_sql = "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['arma3life', '%1']", _query];

_sql is now a string with the format "[[["2384651686874687","1684684658086186453"]]]"

_sql = call compile format["%1", _sql];

_sql now becomes an array with this format: [[["2384651686874687","1684684658086186453"]]]

Now i select my data I want to use.

Share this post


Link to post
Share on other sites

Have you checked both the appdata and root Arma2/3 directory for logs? There should be a log assuming it's setup correctly.

Hello...

Game runs fine until a command is executed to run a SQL query.

I have an issue with Arma2NETMySQL working on Windows Server 2012. I have all the Prerequisites installed.

It works on my desktop running Windows 7, but not on Windows Server 2012.

On the Windows Server 2012, arma2oaserver.exe just hangs. Doesn't say not responding but has 0% cpu utilization and players get disconnected and are unable to reconnect, (Sit at waiting for host)

I've ensured all .dll's are unblocked. I ensured the permissions on files are correct. I've tried to run the server as administrator. Nothing seems to fix the problem.

Anyone have this working on windows server 2012?

Any help on this would be greatly appreciated.

Here is logs:

Arma2NET.2014-3-20.Log:

Arma2NET.log:

Arma2NETMySQL log:

Nothing....

Share this post


Link to post
Share on other sites
Have you checked both the appdata and root Arma2/3 directory for logs? There should be a log assuming it's setup correctly.

Yep... the logs I posted were from there.... the MySql addin does not produce logs... the server just freezes when I issue command...

Share this post


Link to post
Share on other sites

What do you mean by "issue command"?

Yep... the logs I posted were from there.... the MySql addin does not produce logs... the server just freezes when I issue command...

Share this post


Link to post
Share on other sites
What do you mean by "issue command"?

When the SQF executes:

_sql = format["Arma2NETMySQLCommand [dayz_epoch,%1]",_sqlstatement];

SQL_RESULT = "Arma2Net.Unmanaged" callExtension _sql;

(owner _theplayer) publicVariableClient "SQL_RESULT";

the server freezes.....

Share this post


Link to post
Share on other sites

_sql = format["Arma2NETMySQLCommand ['dayz_epoch','%1']",_sqlstatement];

Try that.

When the SQF executes:

_sql = format["Arma2NETMySQLCommand [dayz_epoch,%1]",_sqlstatement];

SQL_RESULT = "Arma2Net.Unmanaged" callExtension _sql;

(owner _theplayer) publicVariableClient "SQL_RESULT";

the server freezes.....

Share this post


Link to post
Share on other sites
_sql = format["Arma2NETMySQLCommand ['dayz_epoch','%1']",_sqlstatement];

Try that.

The issue is not with the commands.... the scripts work on Windows 7, Windows Server 2008...... it just does not work on windows server 2012..

Is this a known issue? Anyone else get this to work on server 2012?

Share this post


Link to post
Share on other sites

What version of .NET are you running? Can you try one of the built-in plugins with Arma2NET to see if it's an issue with Arma2NET or the MySQL plugin?

The issue is not with the commands.... the scripts work on Windows 7, Windows Server 2008...... it just does not work on windows server 2012..

Is this a known issue? Anyone else get this to work on server 2012?

Share this post


Link to post
Share on other sites
What version of .NET are you running? Can you try one of the built-in plugins with Arma2NET to see if it's an issue with Arma2NET or the MySQL plugin?

Arma2NET works... tried Date command... It's the plugin... I think it's because .Net 4.5 is installed on Sever 2012 by default and can't install .Net 4.0...

I am re-imaging system to Server 2008 which it works on..

Share this post


Link to post
Share on other sites

You could try compiling the plugin yourself, you'll need visual studio 2010 (express is free version). I'm not sure why it's not working for you, however, the only system I have to test it on is Windows 7. :/

Arma2NET works... tried Date command... It's the plugin... I think it's because .Net 4.5 is installed on Sever 2012 by default and can't install .Net 4.0...

I am re-imaging system to Server 2008 which it works on..

Share this post


Link to post
Share on other sites

When i am writing this in the Arma2Net Explorer : Arma2Net.Unmanaged" callExtension "ClrVersion"

Should this return a result ? Cause i am getting : throw "Arma2Net.Managed.FunctionNotFoundException""

Arma2Net log file:

03/23/2014 21:47:15 Arma2NET 2.3.0.0 running on CLR 4.0.30319.18449
03/23/2014 21:47:15 Loaded into process Arma2NetExplorer
03/23/2014 21:47:15 Loading add-ins
03/23/2014 21:47:15 Domain                        Name                Version   Publisher           Description
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQLCommandAsync0.1.0.0   firefly2442         Runs asynchronous raw MySQL/SQLite commands
03/23/2014 21:47:15 Arma2NetExplorer.exe          ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
03/23/2014 21:47:15 Arma2NetExplorer.exe          CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
03/23/2014 21:47:15 Arma2NetExplorer.exe          Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
03/23/2014 21:47:15 Arma2NetExplorer.exe          GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
03/23/2014 21:47:15 Arma2NetExplorer.exe          SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
03/23/2014 21:47:15 Arma2NetExplorer.exe          CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
03/23/2014 21:47:15 Arma2NetExplorer.exe          DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
03/23/2014 21:47:15 Arma2NET initialized in 00:00:00.0693927
03/23/2014 21:47:15 Caught exception of type Arma2Net.Managed.FunctionNotFoundException
03/23/2014 21:47:15 Arma2Net.Managed.FunctionNotFoundException: The specified add-in was not found: Arma2Net.Unmanaged"
  at Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize)
  at Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize)
  at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)
03/23/2014 21:47:15 function: Arma2Net.Unmanaged" callExtension "ClrVersion"
03/23/2014 21:47:15 maxResultSize: 4095

And i have installed: http://system.data.sqlite.org/downloads/1.0.89.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.89.0.exe

Running on win8 64bit

Already had the dotNetFx40_Client_x86_x64 my computer says

Edited by Sandbird

Share this post


Link to post
Share on other sites

No, that's the wrong string. Just type "ClrVersion" into Arma2NET Explorer.

When i am writing this in the Arma2Net Explorer : Arma2Net.Unmanaged" callExtension "ClrVersion"

Should this return a result ? Cause i am getting : throw "Arma2Net.Managed.FunctionNotFoundException""

Arma2Net log file:

03/23/2014 21:47:15 Arma2NET 2.3.0.0 running on CLR 4.0.30319.18449
03/23/2014 21:47:15 Loaded into process Arma2NetExplorer
03/23/2014 21:47:15 Loading add-ins
03/23/2014 21:47:15 Domain                        Name                Version   Publisher           Description
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
03/23/2014 21:47:15 Arma2NetExplorer.exe          Arma2NETMySQLCommandAsync0.1.0.0   firefly2442         Runs asynchronous raw MySQL/SQLite commands
03/23/2014 21:47:15 Arma2NetExplorer.exe          ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
03/23/2014 21:47:15 Arma2NetExplorer.exe          CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
03/23/2014 21:47:15 Arma2NetExplorer.exe          Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
03/23/2014 21:47:15 Arma2NetExplorer.exe          GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
03/23/2014 21:47:15 Arma2NetExplorer.exe          SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
03/23/2014 21:47:15 Arma2NetExplorer.exe          CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
03/23/2014 21:47:15 Arma2NetExplorer.exe          DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
03/23/2014 21:47:15 Arma2NET initialized in 00:00:00.0693927
03/23/2014 21:47:15 Caught exception of type Arma2Net.Managed.FunctionNotFoundException
03/23/2014 21:47:15 Arma2Net.Managed.FunctionNotFoundException: The specified add-in was not found: Arma2Net.Unmanaged"
  at Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize)
  at Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize)
  at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)
03/23/2014 21:47:15 function: Arma2Net.Unmanaged" callExtension "ClrVersion"
03/23/2014 21:47:15 maxResultSize: 4095

And i have installed: http://system.data.sqlite.org/downloads/1.0.89.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.89.0.exe

Running on win8 64bit

Already had the dotNetFx40_Client_x86_x64 my computer says

Share this post


Link to post
Share on other sites

omg....if only you knew how many times i uninstalled/installed net frameworks and redistributions T_T

Thanks firefly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×