Jump to content
Sign in to follow this  
jc7788

Arma2:OA not writing to persistant database

Recommended Posts

I am trying to set up a MSO ACE server with a persistent database on a dedicated server. The database connects to Arma, but wont write anything to it. I have followed the directions on setting up the database with MySQL. I have looked everywhere for info, but can find anything. Any help would be great thanks. (server start up params are also correct)

Share this post


Link to post
Share on other sites

Is it able to read? Do you have any error logs?

Share this post


Link to post
Share on other sites

You should use http://forums.bistudio.com/showthread.php?137078-ArmA2-Extended-Dll

Then you can make a new C# class with a call function. A simple example:

 public class DB : IExtension
   {
       public string Call(string args) {
           var con = new MySqlConnection("server={IP};database={DB_NAME};uid={user};Pwd={userpw}");

           args = args.Trim(' ');
           var cmd = new MySqlCommand(" + args + ");",con); // Also works with Routines and DB functions

          var result = .... run cmd.ExecuteReader(); and format it as you like ...
          return result; // can be an array or whatever but it must be put in a string!
       }
   }           

In the .SQF file (executed by the server) you then simply do something like this:

_local = ("ArmA2Ext" callExtension format ["ArmiNET.DB select coords, whatever FROM table WHERE steamid = %1",getPlayerUID _plr]);

On which OS does your server use? Some [i.e. Arma2NET] are not compatible with older/newer frameworks

Edited by Armitxes

Share this post


Link to post
Share on other sites

Moved to discussion, please try to post in the correct area. :)

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  

×