Polaris 1 Posted April 26, 2014 (edited) I'm finding it a little difficult to implement AsyncAddinInvocationMethod. I'm not sure how exactly I set this as my "addin's InvocationMethod property" as instructed in the documentation. I realise this is probably a pretty basic step but there's not an example in the documentation and it's confusing me a little. Also it looks like the beta only has "Addin" and not "MethodAddIn". Is it possible to add "MethodAddin"? I much prefer the ability to specify several methods with detailed arguments rather than being restricted to the structure of Invoke. Edited April 26, 2014 by Polaris Share this post Link to post Share on other sites
MariusxlNan0Byt3 10 Posted April 26, 2014 (edited) arma2net for linux? Edited April 26, 2014 by PurePassion Post moved. Please search before posting. Thank you! Share this post Link to post Share on other sites
Scott_NZ 10 Posted April 26, 2014 I'm finding it a little difficult to implement AsyncAddinInvocationMethod. I'm not sure how exactly I set this as my "addin's InvocationMethod property" as instructed in the documentation. I realise this is probably a pretty basic step but there's not an example in the documentation and it's confusing me a little.Also it looks like the beta only has "Addin" and not "MethodAddIn". Is it possible to add "MethodAddin"? I much prefer the ability to specify several methods with detailed arguments rather than being restricted to the structure of Invoke. There's a basic example of an async addin here. MethodAddin is on the roadmap. Share this post Link to post Share on other sites
firefly2442 6 Posted April 27, 2014 A little bird says callExtension support is being worked on and tested now. Maybe we can entice Scott to port it over. ;) arma2net for linux? Share this post Link to post Share on other sites
Polaris 1 Posted April 27, 2014 There's a basic example of an async addin here.MethodAddin is on the roadmap. That's really helpful thank you. Ah ok, great. I for one will definitely be anxiously awaiting its implementation. I'll probably get used to async using Addin but wait for MethodAddin to actually begin work. Share this post Link to post Share on other sites
derSpaddl 1 Posted April 27, 2014 A little bird says callExtension support is being worked on and tested now. Maybe we can entice Scott to port it over. ;) ATM i try to set up a arma3 Server on linux - we really need this linux support. Maybe i can help by testing?! Share this post Link to post Share on other sites
Polaris 1 Posted April 28, 2014 If you have the time Scott I'd really appreciate MethodAddin as soon as possible because I'm waiting to port our whole system over to async as quickly as I can. I realise you're probably working as hard as you can, I'm simply saying I'd personally appreciate it. Share this post Link to post Share on other sites
Scott_NZ 10 Posted April 30, 2014 Do you need argument parsing as well? Share this post Link to post Share on other sites
Polaris 1 Posted April 30, 2014 That would probably be helpful but not absolutely required I don't think. Share this post Link to post Share on other sites
sandbird 10 Posted May 2, 2014 Can i ask a silly question ? Bringing results with a normal SQL query program like phpmyadmin is not the same with this plugin i know....but.....i am trying to query a table and it brings result of "toolong". Is there a way i can increase the maxResultSize? Why is it that it cant work like phpmyadmin and results have to a specific size ? Thanks Share this post Link to post Share on other sites
Scott_NZ 10 Posted May 2, 2014 No. It's a hard limit imposed by the game itself. If you want to return results larger than what it allows you'll have to split your results up into chunks and return each chunk separately. Share this post Link to post Share on other sites
sandbird 10 Posted May 2, 2014 oh i see..when you say split my resuts....like a select with LIMIT in a for loop ? Count how many rows i have and divide by an equal number then with limit 'select' chunks in an array and then join them all up ? Thanks Share this post Link to post Share on other sites
Polaris 1 Posted May 2, 2014 You should either return the results row by row using LIMIT (with the max row being found using count) or, if you have a single result that is too large, you can split the actual result into pieces, return each piece separately and then assemble them (the second method requires a decent understanding of SQF and C#). It depends on what you want to achieve. Share this post Link to post Share on other sites
sandbird 10 Posted May 9, 2014 Is there a way i can be notified if an "Insert" query is done..but giving a live feed to the player ? For example show a cuttext "Saving into database" while the server is executing the insert..(might take a few seconds due to lag/too many players etc) and when its done...then continue with the rest of the script. Share this post Link to post Share on other sites
firefly2442 6 Posted May 9, 2014 The async method prevents blocking server side. Is this what you need? Is there a way i can be notified if an "Insert" query is done..but giving a live feed to the player ?For example show a cuttext "Saving into database" while the server is executing the insert..(might take a few seconds due to lag/too many players etc) and when its done...then continue with the rest of the script. Share this post Link to post Share on other sites
sandbird 10 Posted May 9, 2014 The async method prevents blocking server side. Is this what you need? Well i am using this method to insert and return results: server_hiveRead = { private["_key","_resultArray","_data"]; _key = _this; _data = format["Arma2NETMySQLCommand ['dayz',""%1""]",_key]; SQL_RESULT = "Arma2Net.Unmanaged" callExtension _data; _resultArray = call compile format ["%1",SQL_RESULT]; _resultArray = _resultArray select 0; _resultArray }; What i want is when i do an 'insert', instead of sending a publicvariableClient variable to the player and a 'waitUntil {!isNil "thevariable"}', to give some live feed to the user....Like...the example that i gave....cause if the server is lagging..this insert might take a few seconds to complete. How will the player know whats going on ? I am a php developer...so i am used to 'while this is executing do that'. I cant think of a way to do it in arma....like...while 'insert' is NOT done yet...show 'Please wait...' and then when its DONE continue with the results and the rest of the script. -Thanks Share this post Link to post Share on other sites
firefly2442 6 Posted May 10, 2014 Yeah, sounds like you want the async version. See here: https://github.com/firefly2442/Arma2NetMySQLPlugin-Arma3-ExampleMission/blob/master/as_loadouts/server_events.sqf and here: http://arma2netmysqlplugin.readthedocs.org/en/latest/#using-the-plugin If you have further questions, it's probably best to take this over to the Arma2NETMySQL thread so we don't hijack this one. :) Well i am using this method to insert and return results: server_hiveRead = { private["_key","_resultArray","_data"]; _key = _this; _data = format["Arma2NETMySQLCommand ['dayz',""%1""]",_key]; SQL_RESULT = "Arma2Net.Unmanaged" callExtension _data; _resultArray = call compile format ["%1",SQL_RESULT]; _resultArray = _resultArray select 0; _resultArray }; What i want is when i do an 'insert', instead of sending a publicvariableClient variable to the player and a 'waitUntil {!isNil "thevariable"}', to give some live feed to the user....Like...the example that i gave....cause if the server is lagging..this insert might take a few seconds to complete. How will the player know whats going on ? I am a php developer...so i am used to 'while this is executing do that'. I cant think of a way to do it in arma....like...while 'insert' is NOT done yet...show 'Please wait...' and then when its DONE continue with the results and the rest of the script. -Thanks Share this post Link to post Share on other sites
sandbird 10 Posted May 10, 2014 Yeah, sounds like you want the async version. See here:https://github.com/firefly2442/Arma2NetMySQLPlugin-Arma3-ExampleMission/blob/master/as_loadouts/server_events.sqf and here: http://arma2netmysqlplugin.readthedocs.org/en/latest/#using-the-plugin If you have further questions, it's probably best to take this over to the Arma2NETMySQL thread so we don't hijack this one. :) oh wow ! Thanks :) Share this post Link to post Share on other sites
Polaris 1 Posted May 13, 2014 Scott I was simply wondering if you'd made any progress with MethodAddin async? I'm eagerly waiting at the window :p. Share this post Link to post Share on other sites
Scott_NZ 10 Posted May 15, 2014 I've been focusing on implementing Linux support over this, but progress has been slow without testers. Share this post Link to post Share on other sites
.kju 3245 Posted May 15, 2014 Scott you should post in the A2CO and A3 Linux server threads. This way you get far easier more attention. :) Share this post Link to post Share on other sites
Polaris 1 Posted May 15, 2014 Alright, I won't waste any more time waiting, thanks for letting me know. Share this post Link to post Share on other sites
firefly2442 6 Posted May 15, 2014 Party my fault sorry, been busy with real-life stuff. I'll try to carve out some time this weekend. I've been focusing on implementing Linux support over this, but progress has been slow without testers. Share this post Link to post Share on other sites
EmphasiS 10 Posted May 15, 2014 I've been focusing on implementing Linux support over this, but progress has been slow without testers. I am actually really interested in testing linux arma2net development versions. Share this post Link to post Share on other sites
Scott_NZ 10 Posted May 15, 2014 If you want to test the current Linux code, make sure you have a recent enough version of 32-bit Mono (can try 64-bit but I doubt it will work on the Linux server later) and MonoDevelop and then do the following: 1. git clone https://github.com/ScottNZ/Arma2NET.git 2. cd Arma2NET 3. git checkout linux 4. Build Arma2Net.sln with a reasonably recent version of MonoDevelop, or edit the .sln and .csproj files with a text editor to downgrade the version if you want to use an old version. You'll have to upgrade MD or downgrade the .sln if the .sln opens in the MD text editor instead of actually opening as a sln. It'll probably partly fail (but Arma2Net.Addins should still build, which is what we're after) since I have a C++/CLI project in there which MonoDevelop isn't going to understand. 5. Copy the built Arma2Net.Addins.dll and the DateTime etc addins into the Linux directory, keeping the folder structure, so have Arma2Net.Addins.dll in there and an Addins folder, with a DateTimeAddin subfolder and DateTimeAddin.dll inside the subfolder. 6. Use 'make' in the Linux directory to build Arma2Net.so and RVExtensionTest 7. Test by using ./RVExtensionTest and then trying eg 'DateTime now' in the prompt. Share this post Link to post Share on other sites