Jump to content

DaCa

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About DaCa

  • Rank
    Rookie
  1. DaCa

    Arma2MySQL

    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.
  2. DaCa

    Arma2MySQL

    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.
  3. DaCa

    Arma2MySQL

    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.
×