Jump to content
Sign in to follow this  
firefly2442

Arma2MySQL

Recommended Posts

I think that should be OK. I've never actually tried it though. If you try it, let me know how it goes.

tnx for your reply, yes for certain operation we are using the async command, is possible that 2 server in a machine with 2 arma2net makes conflicts?

Share this post


Link to post
Share on other sites

I've an idea, can you compile an other version of arma2mysql as the first, but with the name of the function different, I think, if I run arma3-server, arma2net, and two arma2mysql plugins, like arma2mysql-2, and give me the possibility to choose for example:

for action1 use Arma2NETMySQLCommand (arma2mysql1)

for action2 use Arma2NETMySQLCommand2 (arma2mysql2)

I think the performance will increase two times too fast

Share this post


Link to post
Share on other sites

I'm not sure I follow. If you're already running two separate servers, you're running two separate instances of Arma2NET and the plugin. I'm not sure how this is any different.

I've an idea, can you compile an other version of arma2mysql as the first, but with the name of the function different, I think, if I run arma3-server, arma2net, and two arma2mysql plugins, like arma2mysql-2, and give me the possibility to choose for example:

for action1 use Arma2NETMySQLCommand (arma2mysql1)

for action2 use Arma2NETMySQLCommand2 (arma2mysql2)

I think the performance will increase two times too fast

Share this post


Link to post
Share on other sites

i talk about one server of arma3, in one server of arma two arma2mysql to balance queries

Share this post


Link to post
Share on other sites

The current setup should work. Both systems can use the same Databases.txt file. You can have multiple databases defined in this file. Then you can have one database for Arma2 and one database for Arma3.

i talk about one server of arma3, in one server of arma two arma2mysql to balance queries

Share this post


Link to post
Share on other sites

i've another problem, when i open arma3net explorer and list addons everything is ok but when i send the command: > Arma2NETMySQLCommand ['database', 'SELECT * FROM vehicle LIMIT 3'] it say: throw "System.Reflection.TargetInvocationException"

why? the connection is working...

Share this post


Link to post
Share on other sites

I'm guessing it's having trouble finding one of the dependencies. Can you post the log files?

i've another problem, when i open arma3net explorer and list addons everything is ok but when i send the command: > Arma2NETMySQLCommand ['database', 'SELECT * FROM vehicle LIMIT 3'] it say: throw "System.Reflection.TargetInvocationException"

why? the connection is working...

Share this post


Link to post
Share on other sites

Hello Guys,

i'm trying to start a arma 3 server on debian wheezy. My problem is that i can't install the mysql-connector-net-6.8.3.msi it always says that no actions were taken to my system.

Someone know this problem and know a way to fix it?

Thanks for the help.

Share this post


Link to post
Share on other sites

It won't work on Linux. callExtension isn't supported by Linux, we need to petition BIS to add this.

Hello Guys,

i'm trying to start a arma 3 server on debian wheezy. My problem is that i can't install the mysql-connector-net-6.8.3.msi it always says that no actions were taken to my system.

Someone know this problem and know a way to fix it?

Thanks for the help.

Share this post


Link to post
Share on other sites
It won't work on Linux. callExtension isn't supported by Linux, we need to petition BIS to add this.

Hey firefly,

thats realy sad that it won't work on Linux. Thanks for the quick and nice help!

Share this post


Link to post
Share on other sites

Hi firefly,

how can i run Arma2MySQL on windows server 2012 with NetFramework 4.5 cause its blocking the install for NFW 4.0

EDIT: This is the Logfile

03/12/2014 11:11:11 Arma2NET 2.3.0.0 running on CLR 4.0.30319.18449

03/12/2014 11:11:11 Loaded into process arma3server

03/12/2014 11:11:11 Loading add-ins

03/12/2014 11:11:11 Domain Name Version Publisher Description

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

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

03/12/2014 11:11:11 DefaultDomain Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

03/12/2014 11:11:11 DefaultDomain GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

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

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

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

03/12/2014 11:11:11 Arma2NET initialized in 00:00:00.0859340

03/12/2014 11:11:11 Caught exception of type Arma2Net.Managed.FunctionNotFoundException

03/12/2014 11:11:11 Arma2Net.Managed.FunctionNotFoundException: The specified add-in was not found: Arma2NETMySQLCommand

bei Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)

03/12/2014 11:11:11 function: Arma2NETMySQLCommand ['arma3life', 'CALL resetLifeVehicles();']

03/12/2014 11:11:11 maxResultSize: 10239

03/12/2014 11:11:11 Caught exception of type Arma2Net.Managed.FunctionNotFoundException

03/12/2014 11:11:11 Arma2Net.Managed.FunctionNotFoundException: The specified add-in was not found: Arma2NETMySQLCommand

bei Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)

03/12/2014 11:11:11 function: Arma2NETMySQLCommand ['arma3life', 'CALL deleteDeadVehicles();']

03/12/2014 11:11:11 maxResultSize: 10239

03/12/2014 11:11:17 Caught exception of type Arma2Net.Managed.FunctionNotFoundException

03/12/2014 11:11:17 Arma2Net.Managed.FunctionNotFoundException: The specified add-in was not found: Arma2NETMySQLCommand

bei Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize)

bei Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)

03/12/2014 11:11:17 function: Arma2NETMySQLCommand ['arma3life', 'SELECT playerid, name, cash, bankacc, civ_licenses, arrested, adminlevel, donatorlvl, civ_gear FROM players WHERE playerid=76561198020165870']

03/12/2014 11:11:17 maxResultSize: 10239

EDIT AGAIN: We fixed it, everything works fine now :)

Edited by Loomar
DONE

Share this post


Link to post
Share on other sites

Hi Guys,

I am trying to setup another faction on my life server, medics, but it seems to missing some database tables. I think it wants these

private["_uid","_name","_side","_money","_bank","_misc","_query","_result","_array"];

_uid = [_this,0,"",[""]] call BIS_fnc_param;

_name = [_this,1,"",[""]] call BIS_fnc_param;

_side = [_this,2,civilian,[sideUnknown]] call BIS_fnc_param;

_money = [_this,3,"0",[""]] call BIS_fnc_param;

_bank = [_this,4,"2500",[""]] call BIS_fnc_param;

_misc = [_this,5,[],[[],false]] call BIS_fnc_param;

I don't know what expression to use in the table: example `name` varchar(32) NOT NULL,

Any help?

Thanks

Share this post


Link to post
Share on other sites

I'm not sure, I don't do any development with it, sorry. You might try asking in the other forum thread.

Hi Guys,

I am trying to setup another faction on my life server, medics, but it seems to missing some database tables. I think it wants these

private["_uid","_name","_side","_money","_bank","_misc","_query","_result","_array"];

_uid = [_this,0,"",[""]] call BIS_fnc_param;

_name = [_this,1,"",[""]] call BIS_fnc_param;

_side = [_this,2,civilian,[sideUnknown]] call BIS_fnc_param;

_money = [_this,3,"0",[""]] call BIS_fnc_param;

_bank = [_this,4,"2500",[""]] call BIS_fnc_param;

_misc = [_this,5,[],[[],false]] call BIS_fnc_param;

I don't know what expression to use in the table: example `name` varchar(32) NOT NULL,

Any help?

Thanks

Share this post


Link to post
Share on other sites

i was wondering if someone could help me. I have been searching for 2 days but couldn't find the answer. when i start the server and join i gget contacting server for player information

i use navicat lite is this ok?

RPT

http://pastebin.com/3NYpvkcF

much appreciated Hellstorm77

Share this post


Link to post
Share on other sites

You need to install the SQLite dependency version 1.0.89.0.

http://system.data.sqlite.org/index.html/artifact/d15406bb51f93db2?ln

http://arma2netmysqlplugin.readthedocs.org/en/latest/#requirements

i was wondering if someone could help me. I have been searching for 2 days but couldn't find the answer. when i start the server and join i gget contacting server for player information

i use navicat lite is this ok?

RPT

http://pastebin.com/3NYpvkcF

much appreciated Hellstorm77

Share this post


Link to post
Share on other sites

You just need the dependency listed above. You don't need to setup a SQLite server if you're only using MySQL.

I do have mysql server do i need SQLite also? do i need to set the alits life database though SQLite?

Share this post


Link to post
Share on other sites

Hey firefly,

I get an error when I try to pass a variable from Arma 3 into a query, done the same way as your example mission using the "format" command.

This is the error from the log:

Info: 16:28:58 - Received - Database: training SQL Query: SELECT * FROM instructors WHERE pid='
Warning: 16:28:58 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
  at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
  at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
  at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
  at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2NETMySQLPlugin.MySQL.RunOnDatabase(MySqlCommand command, Int32 maxResultSize)

Share this post


Link to post
Share on other sites

You're missing a single quote. It should be SELECT * FROM instructors WHERE pid='123xyz'

Hey firefly,

I get an error when I try to pass a variable from Arma 3 into a query, done the same way as your example mission using the "format" command.

This is the error from the log:

Info: 16:28:58 - Received - Database: training SQL Query: SELECT * FROM instructors WHERE pid='
Warning: 16:28:58 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
  at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
  at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
  at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
  at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2NETMySQLPlugin.MySQL.RunOnDatabase(MySqlCommand command, Int32 maxResultSize)

Share this post


Link to post
Share on other sites

Yeah, it does have the quote. It's just not picking it up for some reason..

This is the query:

_query = format["SELECT * FROM instructors WHERE pid='%1'", _pid];

Share this post


Link to post
Share on other sites

Is '_pid' nil? Have you looked at this for an example?

https://github.com/firefly2442/Arma2NetMySQLPlugin-Arma3-ExampleMission/blob/master/as_loadouts/server_events.sqf

Yeah, it does have the quote. It's just not picking it up for some reason..

This is the query:

_query = format["SELECT * FROM instructors WHERE pid='%1'", _pid];

Share this post


Link to post
Share on other sites

I would start with the regular non async version first for testing. The way you have it setup won't work for the async version. See the readme for details. Also the SQL statement can possibly return more than one row and depending on the structure more than one column. I'm not sure how you have the database setup but I think it will need some additional "cleaning" before you do the comparison check on line 11.

Yeah, I've looked through it. I'm trying to run it like this: http://pastebin.com/ZFDXVnhi

Share this post


Link to post
Share on other sites

I changed the query/command to:

	_query = format["SELECT pid FROM instructors WHERE pid='%1'", _pid];

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

And still gives the same error as before for some reason

Share this post


Link to post
Share on other sites

Try checking if "player" is nil or not defined. That may be making your "_pid" variable nil.

I changed the query/command to:

	_query = format["SELECT pid FROM instructors WHERE pid='%1'", _pid];

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

And still gives the same error as before for some reason

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  

×