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.