Jump to content
Sign in to follow this  
firefly2442

Arma2MySQL

Recommended Posts

hi firefly,

is there any chance to get MS SQL also supported? :)

Share this post


Link to post
Share on other sites

Probably not from me, sorry, I have a lot of other stuff on my plate at the moment and I don't have access to MS SQL. However, you or others can always add it in (the code is GPL). :)

hi firefly,

is there any chance to get MS SQL also supported? :)

Share this post


Link to post
Share on other sites

Hi firefly,

Im trying to setup dedicated server with MySQL plugin and also try to run Altis Life, spend weeks on that and no success so far. Can you please help ?? Problem is that it does not even create any logs nothing, also recompile the Plugin without the problem, just dont understand where could be problem... :(

Share this post


Link to post
Share on other sites

Have you checked the official website?

http://www.altisliferpg.com/

Also, have you watched the instructional video I made for Arma2NETMySQL? I would suggest deleting what you have and re-trying with the compiled version that I provide. Also, the documentation should have all the details you need for dependencies and so on.

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

Check the troubleshooting section. There should be some logs created, either from Arma2NET or Arma2NETMySQL. Try to get to that point and then post the logs, that will help us figure out what the problem is. Good luck! :)

Hi firefly,

Im trying to setup dedicated server with MySQL plugin and also try to run Altis Life, spend weeks on that and no success so far. Can you please help ?? Problem is that it does not even create any logs nothing, also recompile the Plugin without the problem, just dont understand where could be problem... :(

Share this post


Link to post
Share on other sites

I am having a small problem...but its not really arma2net problem..its my poor coding skills lol.

I want to query the database to bring back results for ID = 5 (for example).

Now, if there is no entry for that...then i want to create it..but i am having problem 'checking' if the result is empty.

So far i got this:

_key 	= format["SELECT TIMESTAMPDIFF(MINUTE,`LastUpdated`, NOW()) as `alive` FROM `soldier_data` WHERE id = '%1'", _id];
_result = _key call myserver_hiveReadWrite;
_array = _result select 0 select 0 select 0;  // This should return [[]] if the row doesnt exist
if (_array == "") then {
_key2 = format["insert into soldier_data (id, LastUpdated) values ('%1',CURRENT_TIMESTAMP)",_id];
_key2 call myserver_hiveWrite;
aliveTime= 0;
}else{
aliveTime= _array;
};	

Like i said the problem is that it doesnt recognize if (_array == ""). Although the result is nothing, it goes into else..

I tried call compiling _array, but that didnt work either.

Whats the proper way of doing this ?

-Thanks

EDIT:

I figured it out...I did it like this:

_array = str(_array);

if (_array == "[[]]") then {

Edited by Sandbird

Share this post


Link to post
Share on other sites

any chance to see a linux version? we tried with mono and arma2net seems to be mono compatible. but arma2mysql seems to not work

Share this post


Link to post
Share on other sites

Yeah, I'm helping test Arma2NET Linux so as soon as that's ready I'll port it over. Kinda busy at the moment but it's definitely on my radar. :)

any chance to see a linux version? we tried with mono and arma2net seems to be mono compatible. but arma2mysql seems to not work

Share this post


Link to post
Share on other sites
hi firefly,

is there any chance to get MS SQL also supported? :)

Why would you want to use Microsoft SQL? MySQL is much better than MS SQL. If you really dont like MySQL you can use the Opensource MariaDB. It is a fork of MySQL and very good. In fact many Linux distros switched to MariaDB over MySQL as the default database.

https://mariadb.org/

Share this post


Link to post
Share on other sites

Hi firefly first thanks for this awsomme job but i have a probleme that i"ve got from 2 weeks not

This is the probleme Arma2NET Lauch and i have :

- No log on the Mysql plugin

- The commade Set doesn't work instead the select commande works fine

- This error apear when it lauch and when i try the set commande :

System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly 'System.Data.SQLite, Version=1.0.89.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' ou une de ses dépendances. Tentative de chargement d'un exécutable non vérifiable avec des corrections (table IAT avec plus de 2***sections ou une section TLS.) (Exception de HRESULT : 0x80131019) ---> System.IO.FileLoadException: Tentative de chargement d'un exécutable non vérifiable avec des corrections (table IAT avec plus de 2***sections ou une section TLS.) (Exception de HRESULT : 0x80131019)

More info :

- I try on my pc and a windows server !

- I work on Mysql database using the Mysql Workbench

- I have the arma2NET file and Ama2Mysql plugin from the preconpiled version on the dropbox you gave

- I have install correctly and check for the requirement like the connector and the file in the Roaming folder

If you can help i will be very happy :)

Share this post


Link to post
Share on other sites

Hi. Check the readme. You need to install the SQLite dependency. Make sure to install that specific version that's listed (1.0.89.0).

Hi firefly first thanks for this awsomme job but i have a probleme that i"ve got from 2 weeks not

This is the probleme Arma2NET Lauch and i have :

- No log on the Mysql plugin

- The commade Set doesn't work instead the select commande works fine

- This error apear when it lauch and when i try the set commande :

System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly 'System.Data.SQLite, Version=1.0.89.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' ou une de ses dépendances. Tentative de chargement d'un exécutable non vérifiable avec des corrections (table IAT avec plus de 2***sections ou une section TLS.) (Exception de HRESULT : 0x80131019) ---> System.IO.FileLoadException: Tentative de chargement d'un exécutable non vérifiable avec des corrections (table IAT avec plus de 2***sections ou une section TLS.) (Exception de HRESULT : 0x80131019)

More info :

- I try on my pc and a windows server !

- I work on Mysql database using the Mysql Workbench

- I have the arma2NET file and Ama2Mysql plugin from the preconpiled version on the dropbox you gave

- I have install correctly and check for the requirement like the connector and the file in the Roaming folder

If you can help i will be very happy :)

Share this post


Link to post
Share on other sites

Yeeaaa it Work perfect thank you man ;)

I will put you in the thanks list of my mission for sure !

Share this post


Link to post
Share on other sites

Glad it works. :) Have fun.

Yeeaaa it Work perfect thank you man ;)

I will put you in the thanks list of my mission for sure !

Share this post


Link to post
Share on other sites

Will this work with MariaDB? I want to use the fork of MySQL (MariaDB) instead. It is a binary drop in replacement of MySQL.

---------- Post added at 19:16 ---------- Previous post was at 19:10 ----------

MariaDB has a Native C/C++ connector plugin that can be used. Not sure if that helps with using SQL with ArmA 2

Share this post


Link to post
Share on other sites
Will this work with MariaDB? I want to use the fork of MySQL (MariaDB) instead. It is a binary drop in replacement of MySQL.

---------- Post added at 19:16 ---------- Previous post was at 19:10 ----------

MariaDB has a Native C/C++ connector plugin that can be used. Not sure if that helps with using SQL with ArmA 2

I believe it should work but I haven't tried it. I did some quick searching online and found this: "All MySQL connectors (PHP, Perl, Python, Java, .NET, MyODBC, Ruby, MySQL C connector etc) work unchanged with MariaDB. " So... I think it should work.

Share this post


Link to post
Share on other sites

Hello,

I'm trying to get the plugin working on a custom mission but it goes into an infinite loop when trying to retrieve the value. I can get the provided Arma 3 Example mission working.

I've modified and simplified the SQL to see if it was possible to read a value from the database. The SQF looks like this:

while {isNil("_selectTest")} do {
_selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']";
if (_selectTest == "") then {
	hintSilent format ["SQL Result was: %1 , trying again", _selectTest];
	_selectTest = nil;
};
sleep 0.5;  //sleep for a half-second so we don't thrash the server with callExtension calls
};

Using this, it goes into an infinite loop always saying that its returning "".

However looking at the logs for the plugin I see the following:

06/09/2014 20:12:07 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:12 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:12 maxResultSize: 10239
06/09/2014 20:12:12 Result size: 0
06/09/2014 20:12:12 Result: <null>
06/09/2014 20:12:17 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:17 maxResultSize: 10239
06/09/2014 20:12:17 Result size: 16
06/09/2014 20:12:17 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:22 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:22 maxResultSize: 10239
06/09/2014 20:12:22 Result size: 0
06/09/2014 20:12:22 Result: <null>
06/09/2014 20:12:27 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:27 maxResultSize: 10239
06/09/2014 20:12:27 Result size: 16
06/09/2014 20:12:27 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:32 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:32 maxResultSize: 10239
06/09/2014 20:12:32 Result size: 0
06/09/2014 20:12:32 Result: <null>
06/09/2014 20:12:37 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:37 maxResultSize: 10239
06/09/2014 20:12:37 Result size: 16
06/09/2014 20:12:37 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:42 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:42 maxResultSize: 10239
06/09/2014 20:12:42 Result size: 0
06/09/2014 20:12:42 Result: <null>
06/09/2014 20:12:47 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:47 maxResultSize: 10239
06/09/2014 20:12:47 Result size: 16
06/09/2014 20:12:47 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:52 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:52 maxResultSize: 10239
06/09/2014 20:12:52 Result size: 0
06/09/2014 20:12:52 Result: <null>

And it keeps going in wonderful thing that is infinite loops.

So it does return a result (hgfdhfhf is the value I'm looking for) however it's not being read by my code? The code is currently being executed as a procedure triggered by spawn of a player character, could this be the issue? Something preventing the results from being passed along?

Thank you.

Share this post


Link to post
Share on other sites

for some reason when i activate Arma2net@ and run the server and while loading the mission file the server hosting programe stop working.

here is the logs:

06/09/2014 20:59:24 Arma2NET 2.3.0.0 running on CLR 4.0.30319.18444

06/09/2014 20:59:24 Loaded into process Arma2NetExplorer

06/09/2014 20:59:24 Loading add-ins

06/09/2014 20:59:25 Domain Name Version Publisher Description

06/09/2014 20:59:25 Arma2NetExplorer.exe ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime.

06/09/2014 20:59:25 Arma2NetExplorer.exe CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare.

06/09/2014 20:59:25 Arma2NetExplorer.exe Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

06/09/2014 20:59:25 Arma2NetExplorer.exe GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

06/09/2014 20:59:25 Arma2NetExplorer.exe SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value.

06/09/2014 20:59:25 Arma2NetExplorer.exe CLServer2Lib

06/09/2014 20:59:25 Arma2NetExplorer.exe CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application.

06/09/2014 20:59:25 Arma2NetExplorer.exe DateTime 2.0.0.0 Scott_NZ Returns the current date and time.

06/09/2014 20:59:25 Arma2NetExplorer.exe Str 2.0.0.0 Arma2NET Developers Provides string functionality.

06/09/2014 20:59:25 Arma2NetExplorer.exe Dict 2.0.0.0 Arma2NET Developers Provides hashtable functionality.

06/09/2014 20:59:25 Arma2NET initialized in 00:00:00.9594919

06/09/2014 20:59:25 function: AddIns

06/09/2014 20:59:25 maxResultSize: 4095

06/09/2014 20:59:25 Result size: 141

06/09/2014 20:59:25 Result: ["ClrVersion", "CompareVersion", "Version", "GetClipboardText", "SetClipboardText", "CLServer2Lib", "CommandLine", "DateTime", "Str", "Dict"]

06/09/2014 21:02:51 Arma2NET 2.3.0.0 running on CLR 4.0.30319.18444

06/09/2014 21:02:51 Loaded into process Arma2NetExplorer

06/09/2014 21:02:51 Loading add-ins

06/09/2014 21:02:52 Domain Name Version Publisher Description

06/09/2014 21:02:52 Arma2NetExplorer.exe ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime.

06/09/2014 21:02:52 Arma2NetExplorer.exe CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare.

06/09/2014 21:02:52 Arma2NetExplorer.exe Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

06/09/2014 21:02:52 Arma2NetExplorer.exe GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

06/09/2014 21:02:52 Arma2NetExplorer.exe SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value.

06/09/2014 21:02:52 Arma2NetExplorer.exe CLServer2Lib

06/09/2014 21:02:52 Arma2NetExplorer.exe CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application.

06/09/2014 21:02:52 Arma2NetExplorer.exe DateTime 2.0.0.0 Scott_NZ Returns the current date and time.

06/09/2014 21:02:52 Arma2NetExplorer.exe Str 2.0.0.0 Arma2NET Developers Provides string functionality.

06/09/2014 21:02:52 Arma2NetExplorer.exe Dict 2.0.0.0 Arma2NET Developers Provides hashtable functionality.

06/09/2014 21:02:52 Arma2NET initialized in 00:00:00.0821504

06/09/2014 21:02:52 function: AddIns

06/09/2014 21:02:52 maxResultSize: 4095

06/09/2014 21:02:52 Result size: 141

06/09/2014 21:02:52 Result: ["ClrVersion", "CompareVersion", "Version", "GetClipboardText", "SetClipboardText", "CLServer2Lib", "CommandLine", "DateTime", "Str", "Dict"]

06/09/2014 21:06:59 function: ClrVersion

06/09/2014 21:06:59 maxResultSize: 4095

06/09/2014 21:06:59 Result size: 17

06/09/2014 21:06:59 Result: "4.0.30319.18444"

06/09/2014 21:23:42 function: AddIns

06/09/2014 21:23:42 maxResultSize: 4095

06/09/2014 21:23:42 Result size: 141

06/09/2014 21:23:42 Result: ["ClrVersion", "CompareVersion", "Version", "GetClipboardText", "SetClipboardText", "CLServer2Lib", "CommandLine", "DateTime", "Str", "Dict"]

06/09/2014 21:23:58 Unloading add-ins

06/09/2014 21:23:58 Loading add-ins

06/09/2014 21:23:58 Domain Name Version Publisher Description

06/09/2014 21:23:58 Arma2NetExplorer.exe ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime.

06/09/2014 21:23:58 Arma2NetExplorer.exe CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare.

06/09/2014 21:23:58 Arma2NetExplorer.exe Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

06/09/2014 21:23:58 Arma2NetExplorer.exe GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

06/09/2014 21:23:58 Arma2NetExplorer.exe SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value.

06/09/2014 21:23:58 Arma2NetExplorer.exe CLServer2Lib

06/09/2014 21:23:58 Arma2NetExplorer.exe CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application.

06/09/2014 21:23:58 Arma2NetExplorer.exe DateTime 2.0.0.0 Scott_NZ Returns the current date and time.

06/09/2014 21:23:58 Arma2NetExplorer.exe Str 2.0.0.0 Arma2NET Developers Provides string functionality.

06/09/2014 21:23:58 Arma2NetExplorer.exe Dict 2.0.0.0 Arma2NET Developers Provides hashtable functionality.

06/09/2014 21:23:58 function: Reload

06/09/2014 21:23:58 maxResultSize: 4095

06/09/2014 21:23:58 Result size: 0

06/09/2014 21:23:58 Result: <null>

06/09/2014 21:24:01 function: Load

06/09/2014 21:24:01 maxResultSize: 4095

06/09/2014 21:24:01 Result size: 0

06/09/2014 21:24:01 Result: <null>

06/09/2014 21:24:03 function: AddIns

06/09/2014 21:24:03 maxResultSize: 4095

06/09/2014 21:24:03 Result size: 141

06/09/2014 21:24:03 Result: ["ClrVersion", "CompareVersion", "Version", "GetClipboardText", "SetClipboardText", "CLServer2Lib", "CommandLine", "DateTime", "Str", "Dict"]

06/09/2014 21:24:03 function: Load

06/09/2014 21:24:03 maxResultSize: 4095

06/09/2014 21:24:03 Result size: 0

06/09/2014 21:24:03 Result: <null>

06/09/2014 21:24:03 Unloading add-ins

06/09/2014 21:24:03 Loading add-ins

06/09/2014 21:24:03 Domain Name Version Publisher Description

06/09/2014 21:24:03 Arma2NetExplorer.exe ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime.

06/09/2014 21:24:03 Arma2NetExplorer.exe CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare.

06/09/2014 21:24:03 Arma2NetExplorer.exe Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET.

06/09/2014 21:24:03 Arma2NetExplorer.exe GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value.

06/09/2014 21:24:03 Arma2NetExplorer.exe SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value.

06/09/2014 21:24:03 Arma2NetExplorer.exe CLServer2Lib

06/09/2014 21:24:03 Arma2NetExplorer.exe CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application.

06/09/2014 21:24:03 Arma2NetExplorer.exe DateTime 2.0.0.0 Scott_NZ Returns the current date and time.

06/09/2014 21:24:03 Arma2NetExplorer.exe Str 2.0.0.0 Arma2NET Developers Provides string functionality.

06/09/2014 21:24:03 Arma2NetExplorer.exe Dict 2.0.0.0 Arma2NET Developers Provides hashtable functionality.

06/09/2014 21:24:03 function: Reload

06/09/2014 21:24:03 maxResultSize: 4095

06/09/2014 21:24:03 Result size: 0

06/09/2014 21:24:03 Result: <null>

Share this post


Link to post
Share on other sites

Hmm, can you try running the query with Arma2NETExplorer? There are instructions in the readme for this. If that works, then I'm guessing the issue is in the SQF code.

Hello,

I'm trying to get the plugin working on a custom mission but it goes into an infinite loop when trying to retrieve the value. I can get the provided Arma 3 Example mission working.

I've modified and simplified the SQL to see if it was possible to read a value from the database. The SQF looks like this:

while {isNil("_selectTest")} do {
_selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']";
if (_selectTest == "") then {
	hintSilent format ["SQL Result was: %1 , trying again", _selectTest];
	_selectTest = nil;
};
sleep 0.5;  //sleep for a half-second so we don't thrash the server with callExtension calls
};

Using this, it goes into an infinite loop always saying that its returning "".

However looking at the logs for the plugin I see the following:

06/09/2014 20:12:07 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:12 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:12 maxResultSize: 10239
06/09/2014 20:12:12 Result size: 0
06/09/2014 20:12:12 Result: <null>
06/09/2014 20:12:17 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:17 maxResultSize: 10239
06/09/2014 20:12:17 Result size: 16
06/09/2014 20:12:17 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:22 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:22 maxResultSize: 10239
06/09/2014 20:12:22 Result size: 0
06/09/2014 20:12:22 Result: <null>
06/09/2014 20:12:27 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:27 maxResultSize: 10239
06/09/2014 20:12:27 Result size: 16
06/09/2014 20:12:27 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:32 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:32 maxResultSize: 10239
06/09/2014 20:12:32 Result size: 0
06/09/2014 20:12:32 Result: <null>
06/09/2014 20:12:37 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:37 maxResultSize: 10239
06/09/2014 20:12:37 Result size: 16
06/09/2014 20:12:37 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:42 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:42 maxResultSize: 10239
06/09/2014 20:12:42 Result size: 0
06/09/2014 20:12:42 Result: <null>
06/09/2014 20:12:47 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:47 maxResultSize: 10239
06/09/2014 20:12:47 Result size: 16
06/09/2014 20:12:47 Result: [[["hgfdhfhf"]]]
06/09/2014 20:12:52 function: Arma2NETMySQLCommandAsync ['weaponsArma3', 'SELECT name FROM `users` WHERE id ='1'']
06/09/2014 20:12:52 maxResultSize: 10239
06/09/2014 20:12:52 Result size: 0
06/09/2014 20:12:52 Result: <null>

And it keeps going in wonderful thing that is infinite loops.

So it does return a result (hgfdhfhf is the value I'm looking for) however it's not being read by my code? The code is currently being executed as a procedure triggered by spawn of a player character, could this be the issue? Something preventing the results from being passed along?

Thank you.

---------- Post added at 21:46 ---------- Previous post was at 21:45 ----------

What do the Arma2NETMySQL logs say?

for some reason when i activate Arma2net@ and run the server and while loading the mission file the server hosting programe stop working.

here is the logs:

Share this post


Link to post
Share on other sites

Executing the query with Arma2NETExplorer gives the same output as the logs when running the query in the code. First result is empty as expected and the 2nd returns the desired value.

The SQF for interfacing with the database/using plugin is almost a complete copy-paste of the ones given in the readme file.

If I change my SQL to an insert statement the value gets correctly inserted into the database (both via Arma2NetExplorer and ingame SQF), I just can't get any value out of it.

Thank you for your assistance.

Hmm, can you try running the query with Arma2NETExplorer? There are instructions in the readme for this. If that works, then I'm guessing the issue is in the SQF code.
Edited by DaCa

Share this post


Link to post
Share on other sites

Is the code inside an isServer check?

http://community.bistudio.com/wiki/isServer

If you look at the example mission, the server_events.sqf file has additional details, although the core of it is the same. If you are able to get the example mission working, I'm guessing the issue has something to do with your mission and the SQF code.

Executing the query with Arma2NETExplorer gives the same output as the logs when running the query in the code. First result is empty as expected and the 2nd returns the desired value.

The SQF for interfacing with the database/using plugin is almost a complete copy-paste of the ones given in the readme file.

If I change my SQL to an insert statement the value gets correctly inserted into the database (both via Arma2NetExplorer and ingame SQF), I just can't get any value out of it.

Thank you for your assistance.

Share this post


Link to post
Share on other sites

Firefly you shuld have me on steam can you please msg me there when you are online

Edited by lifemanlive

Share this post


Link to post
Share on other sites

Hey Firefly, would you be able to help me with this?

I am trying to link ArmA 3 on my Computer to a remove SQL Server so I can test DB functions before actually uploading the Mission file to the Server but whenever I execute an SQL Command, my game instantly crashes.

Command I am sending:

_query = format["INSERT INTO lplayers (name, playerid, side) VALUES('%1', '%2', '%3')",(name player),(getPlayerUID player),(Side player)];
_sql = "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['%2', '%1']", _query,'nickp_1'];

My Database.txt

#SQL Server
mysql,nickp_1,*IP*,3306,nickp,*Password*

ArmA 2 NET log

06/13/2014 00:24:50 Arma2Net.Unmanaged loaded successfully
06/13/2014 00:24:50 Fatal unhandled exception of type System.IO.FileNotFoundException
06/13/2014 00:24:50 System.IO.FileNotFoundException: Could not load file or assembly 'Arma2Net.Managed, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e' or one of its dependencies. The system cannot find the file specified.
File name: 'Arma2Net.Managed, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e'
  at Arma2Net.Unmanaged.InvokeFunctionImpl(SByte* output, Int32 outputSize, SByte* function)
  at Arma2Net.Unmanaged.InvokeFunction(SByte* output, Int32 outputSize, SByte* function)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I have also tried to use your Example Mission but I get the same error.

Any Ideas?

Thanks

Edit: Never mind, after a bit of a search, I found out that my Computer had blocked the .dll files.

I unblocked them and it's working now!

Edited by nick103

Share this post


Link to post
Share on other sites

okey so for some reason when i got @arma2net activated on my server with the mods its not letting some off my server sided files load?

Share this post


Link to post
Share on other sites

I'm not sure what you mean. What files specifically?

okey so for some reason when i got @arma2net activated on my server with the mods its not letting some off my server sided files load?

Share this post


Link to post
Share on other sites

I figured it out firefly, even though it was inside a isServer check it kept doing the same thing but running it with the CBA event handling as is done in your example I got it to work. Thanks for your assistance.

Share this post


Link to post
Share on other sites

Any idea why I'm getting this?

06/14/2014 00:32:24 function: Arma2NETMySQLCommand ['nickp_1', 'INSERT INTO test_lplayers (uid, name, Bank, vkeys, licences, insurance, gear, weapons, inventory, settings, blacklist) VALUES('76561198085735088CIV', 'Nick', '[10000,1e+006,0]', '[]', '[]', '[false,false,false]', '['U_C_Poor_shorts_1',['FirstAidKit']]', '[]', '[]', '[true]', '[0,1,0]')']
06/14/2014 00:32:24 maxResultSize: 10239

It will send to the server fine if I don't save the "Gear" or "Weapons" section.

Thanks.

Edit: I spent hours trying to figure this out last night but I literally figured it out 5 minutes after posting this.... Sometimes I have ArmA scripting haha

Thanks

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  

×