Jump to content

firefly2442

Member
  • Content Count

    563
  • Joined

  • Last visited

  • Medals

Everything posted by firefly2442

  1. https://github.com/firefly2442/ArmaConnect#installation Glad people like it, I hope more people try it. I haven't had much time to work on it lately but there is definitely more stuff on my to-do list. :)
  2. firefly2442

    Arma2MySQL

    The example mission for Arma 3 uses async. See server_events.sqf https://github.com/firefly2442/Arma2NetMySQLPlugin-Arma3-ExampleMission
  3. firefly2442

    Arma2MySQL

    Maybe try something like this? http://bogdan.org.ua/2007/10/18/mysql-insert-if-not-exists-syntax.html ---------- Post added at 16:59 ---------- Previous post was at 16:50 ---------- For your first question, it might be getting hung on this: Hitpoints = '[]' . Try just using the empty string '' instead. Or maybe that was formatted as an integer value in MySQL? Basically, whatever type that's set as, I'm guessing you're passing in something it doesn't like. Regarding the double quotes, I would recommend stripping those out before saving them to the database. You'll just have more headaches later on otherwise. For the multiple queries and missing items, I'm not sure. Have you tried the async method instead? That actually should be faster and perhaps it's more reliable? Also, are you sure writing to the database is only being called via the server one at a time? If you have multiple threads or different scripts spawning off, you can't have more than one trying to write/read from the database at the same time.
  4. firefly2442

    Arma2MySQL

    Try printing _query via diag_log to make sure it's what it should be. Then run that query. You're only setting the ending value with %1. You need to do the same thing for _playerLostsResults as well. MySQL/SQL has no idea what that is. You're trying to pass it as a variable but it's interpreting it as a string literal.
  5. firefly2442

    Arma2NET

    http://www.microsoft.com/net/downloads
  6. firefly2442

    Arma2MySQL

    Ahh, I think I see the error. The _playerLostsResults + 1 that you're trying to do inside the query there is being evaluated as a string literal. You need to use format to create the string first before sending it through the plugin.
  7. firefly2442

    Arma2MySQL

    I'm guessing that's an invalid SQL query. Try printing it out before you execute it and run it manually to see if there's an error. Or, check the Arma2NETMySQL log file, there might be additional information and/or the error message in there.
  8. firefly2442

    Arma2MySQL

    Try this instead: _playerLostsResult = call compile _playerLostsResult;
  9. firefly2442

    Arma2MySQL

    I've started work on it and there are some development testing branches on Github. The trouble has been the third party Mono libraries for SQLite and MySQL. I haven't had much time lately to work on it. So at this point, no sorry. If anyone wants to dive in and try it, everything is up on Github.
  10. firefly2442

    Arma2MySQL

    Perhaps try using "compile" on the result. This should convert it to an array type. https://community.bistudio.com/wiki/compile
  11. firefly2442

    Arma2NET

    See Scott's post here: http://forums.bistudio.com/showthread.php?131325-Arma2NET&p=2690960&viewfull=1#post2690960
  12. firefly2442

    Arma2MySQL

    Yes, there's the asynchronous method. This is actually less taxing on the server because it doesn't block until the result is returned. See here: http://arma2netmysqlplugin.readthedocs.org/en/latest/#straight-mysql-queries
  13. firefly2442

    Arma2MySQL

    Does the deletion work? One thing I can think of is perhaps the ObjectUID (which I assume is a primary key) already exists if the entry doesn't get deleted. Then if you try to add it, it may silently fail? What else.... have you thought about using an update statement instead? Since all the other information is the same you could reduce the deletion and insertion down to just update. https://dev.mysql.com/doc/refman/5.0/en/update.html One thing I would suggest is this. In the diag_log statements that output the SQL command, make them both unique to the file so you can be absolutely sure which one is being executed. Perhaps the swapObject is not being called like you think it is? That's all I can think of at the moment. Try those and let us know what you get. Good luck. :)
  14. Looks cool. :) There's a development branch for Arma2NET on Github that compiles and works on Linux. I ran into some dependency troubles with Mono libraries but it does seem to work.
  15. In the editor, if you click on the "intel" button, it brings up a window to set the date and time, weather parameters like overcast, fog, wind, waves, etc. There are sliders for both current values and forecast values. There seem to be scripting commands to set values for the current value for all these items, however I only see "fogForecast" and "overcastForecast" to set the forecast. All the other items don't appear to have the ability to set future values. It's kind of odd because there are sliders in the game to set these so are they just undocumented or not implemented? https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
  16. I opened a ticket because I think the forecast should be expanded to the other weather variables/properties. http://feedback.arma3.com/view.php?id=20932
  17. firefly2442

    Arma2MySQL

    Try one last thing for me. Change this: _strCreate = format ["[objUID=%1,instanceNr=%2,class='%3',dmg=%4,charID=%5,world='%6',inv='%7',hits='%8',code=%9]", _uid, dayz_instance, _class, 0, _charID, _worldspace, [], [], _fuel ]; To this: _strCreate = format ["[ObjectUID=%1,Instance=%2,Classname=%3,Damage=%4,CharacterID=%5,Worldspace=%6,Inventory=%7,Hitpoints=%8,Fuel=%9]", _uid, dayz_instance, _class, 0, _charID, _worldspace, [], [], _fuel ]; I removed some single quotes and change the parameter names to match those of the stored procedure. IIRC, the parameter names need to match.
  18. firefly2442

    Arma2MySQL

    Hmm, it might have to do with the "world" parameter. It looks like it's a nested array or something. It could be failing to parse that. Try using "[]" or an empty string for that parameter and see what happens. Also, do you have any other stored procedures working through Arma2MySQL?
  19. Yes, right now it checks to see if you have a watch (date/time info) or GPS (map view and player location) as the only limitation for whether information is displayed or not.
  20. Hmm, thanks. It still doesn't really explain the editor interface and the sliders though. Maybe those are things they'll release in the future.
  21. firefly2442

    Arma2MySQL

    Hmm, I'm not quite sure how to do it without CBA. Perhaps start a thread in the Arma 3 scripting section and ask people what the alternatives would be? Sorry, I'm just not that familiar with everything that's in stock Arma. Maybe event handlers? https://community.bistudio.com/wiki/addEventHandler
  22. firefly2442

    Arma2MySQL

    I'm not 100% sure but I think I have an idea as to what the problem is. It's tough to tell with this code formatting. The player cannot run the database calls, they have to be run on the server since this is server-side only. If you want the player to do something or trigger a database call, you'll need to call it on the server and then pass the information to the client. Look at the example mission, in particular the server_events.sqf file to see how that can work. https://github.com/firefly2442/Arma2NetMySQLPlugin-Arma3-ExampleMission
  23. firefly2442

    Arma2MySQL

    No, I meant that you need to call the script somehow. The init.sqf is the starting point. If you have it working in the init but not working somewhere else, I'm guessing it's an SQF scripting issue. Can you post the log files from Arma2NETMySQL?
  24. firefly2442

    Arma2MySQL

    Is the part that's not working inside an isServer check? The start point of the mission is init.sqf, if the script that isn't working is not called from init.sqf or somewhere along the line, it won't get run. Put debug print statements in to see where it's getting. https://community.bistudio.com/wiki/diag_log
  25. Let me know if you need any CMake or Linux help/testing. :)
×