Jump to content

Recommended Posts

Attempting to run MSO Mission pack via Persistent Database using ArmA2NET and ArmA2MySQLPlugin,

This is the result

Fault address:  7741C41F 01:0000B41F C:\Windows\syswow64\KERNELBASE.dll

All folders are set up as they should be, with this file structure

ArmA 2/OA root folder
Databases.txt

>@ArmA2NET
ArmA2Net.AddInProxy.dll
ArmA2Net.Managed.dll
ArmA2Net.Unmanaged.dll
ArmA2Net.Unmanaged.Mono.dll
ArmA2NetExplorer.exe
ArmA2NetExplorerEvaluatorHistory.dat
authors.txt
changelog.txt
license.rtf
MonoPaths.txt
NLog.config
NLog.dll
readme.md

>>AddIns

>>>ArmA2NETMySQLPlugin
ArmA2NETMySQLPlugin.dll
ArmA2NETMySQLPlugin-readme.txt
Databases.txt
MySql.Data.Dll

>>>BaseFunctionsPlugin
BaseFunctionsPlugin.dll

>>CommandLinePlugin
CommandLinePlugin.dll

>>>DateTimPlugin
DateTimePlugin.dll

>>>ServerPlugin
Newtonsoft.Json.dll
Newtonsoft.Json.xml
ServerPlugin.dll

Log File from ArmA2NET in AppData/Local

07/06/2013 23:39:56 Info Arma2NET 2.2.0.0 running on CLR 4.0.30319.17929
07/06/2013 23:39:56 Info Loaded into process Arma2NetExplorer
07/06/2013 23:39:56 Info Loading addins
07/06/2013 23:39:56 Info Domain                        Name                Version   Publisher           Description
07/06/2013 23:39:56 Info Arma2NETMySQLPlugin           Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
07/06/2013 23:39:56 Info Arma2NETMySQLPlugin           Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
07/06/2013 23:39:56 Info BaseFunctionsPlugin           CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
07/06/2013 23:39:56 Info BaseFunctionsPlugin           ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
07/06/2013 23:39:56 Info BaseFunctionsPlugin           Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
07/06/2013 23:39:56 Info CommandLinePlugin             CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
07/06/2013 23:39:56 Info DateTimePlugin                DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
07/06/2013 23:39:56 Info ServerPlugIn                  ServerLocation      0.1.0.0   Tupolov             Returns the ARMA 2 server geo location.
07/06/2013 23:39:56 Info ServerPlugIn                  ServerName          0.1.0.0   Tupolov             Returns the ARMA 2 server name.
07/06/2013 23:39:56 Info ServerPlugIn                  ServerAddress       0.1.0.0   Tupolov             Returns the ARMA 2 server IP address.
07/06/2013 23:39:56 Info Arma2NET initialized in 00:00:00.3670324
07/06/2013 23:44:29 Log: Unmanaged side loaded
07/06/2013 23:44:29 Log: Failed to load Arma2Net.Managed.NLogger, falling back to Arma2Net.Managed.NullLogger
07/06/2013 23:44:29 Log: Arma2NET failed to initialize due to an exception of type System.IO.DirectoryNotFoundException
Log: System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Games\Retail Games\Bohemia Interactive\ArmA 2\expansion\beta\AddIns'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileSystemEnumerableIterator`1.CommonInit()
  at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
  at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
  at Arma2Net.Managed.AddInManager.FindAddInAssemblies()
  at Arma2Net.Managed.AddInManager.LoadAddIns()
  at Arma2Net.Managed.Bridge.Initialize()
07/06/2013 23:44:29 Log: Fatal unhandled exception of type System.TypeInitializationException
Log: System.TypeInitializationException: The type initializer for 'Arma2Net.Managed.Bridge' threw an exception. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Games\Retail Games\Bohemia Interactive\ArmA 2\expansion\beta\AddIns'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileSystemEnumerableIterator`1.CommonInit()
  at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
  at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
  at Arma2Net.Managed.AddInManager.FindAddInAssemblies()
  at Arma2Net.Managed.AddInManager.LoadAddIns()
  at Arma2Net.Managed.Bridge.Initialize()
  at Arma2Net.Managed.Bridge..cctor()
  --- End of inner exception stack trace ---
  at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)
  at Arma2Net.Unmanaged.InvokeFunctionImpl(SByte* output, Int32 outputSize, SByte* function)
  at Arma2Net.Unmanaged.InvokeFunction(SByte* output, Int32 outputSize, SByte* function)
07/06/2013 23:45:55 Info Arma2NET 2.2.0.0 running on CLR 4.0.30319.17929
07/06/2013 23:45:55 Info Loaded into process Arma2NetExplorer
07/06/2013 23:45:55 Info Loading addins
07/06/2013 23:45:55 Info Domain                        Name                Version   Publisher           Description
07/06/2013 23:45:55 Info Arma2NETMySQLPlugin           Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
07/06/2013 23:45:55 Info Arma2NETMySQLPlugin           Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
07/06/2013 23:45:55 Info BaseFunctionsPlugin           CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
07/06/2013 23:45:55 Info BaseFunctionsPlugin           ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
07/06/2013 23:45:55 Info BaseFunctionsPlugin           Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
07/06/2013 23:45:55 Info CommandLinePlugin             CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
07/06/2013 23:45:55 Info DateTimePlugin                DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
07/06/2013 23:45:55 Info ServerPlugIn                  ServerLocation      0.1.0.0   Tupolov             Returns the ARMA 2 server geo location.
07/06/2013 23:45:55 Info ServerPlugIn                  ServerName          0.1.0.0   Tupolov             Returns the ARMA 2 server name.
07/06/2013 23:45:55 Info ServerPlugIn                  ServerAddress       0.1.0.0   Tupolov             Returns the ARMA 2 server IP address.
07/06/2013 23:45:55 Info Arma2NET initialized in 00:00:00.2671413
07/06/2013 23:45:55 Info Unloading addins
07/06/2013 23:45:55 Error Caught exception of type System.NullReferenceException while unloading addin Arma2NETMySQLPlugin
System.NullReferenceException: Object reference not set to an instance of an object.
  at Arma2NETMySQLPlugin.Startup.Unload()
  at Arma2NETMySQLPlugin.Arma2NETMySQLPlugin.Unload()
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
  at Arma2Net.Managed.AddInManager.UnloadAddIns()
07/06/2013 23:45:57 Info Loading addins
07/06/2013 23:45:57 Info Domain                        Name                Version   Publisher           Description
07/06/2013 23:45:57 Info Arma2NETMySQLPlugin           Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
07/06/2013 23:45:57 Info Arma2NETMySQLPlugin           Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
07/06/2013 23:45:57 Info BaseFunctionsPlugin           CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
07/06/2013 23:45:57 Info BaseFunctionsPlugin           ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
07/06/2013 23:45:57 Info BaseFunctionsPlugin           Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
07/06/2013 23:45:57 Info CommandLinePlugin             CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
07/06/2013 23:45:57 Info DateTimePlugin                DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
07/06/2013 23:45:57 Info ServerPlugIn                  ServerLocation      0.1.0.0   Tupolov             Returns the ARMA 2 server geo location.
07/06/2013 23:45:57 Info ServerPlugIn                  ServerName          0.1.0.0   Tupolov             Returns the ARMA 2 server name.
07/06/2013 23:45:57 Info ServerPlugIn                  ServerAddress       0.1.0.0   Tupolov             Returns the ARMA 2 server IP address.
07/06/2013 23:45:58 Info Unloading addins
07/06/2013 23:45:58 Error Caught exception of type System.NullReferenceException while unloading addin Arma2NETMySQLPlugin
System.NullReferenceException: Object reference not set to an instance of an object.
  at Arma2NETMySQLPlugin.Startup.Unload()
  at Arma2NETMySQLPlugin.Arma2NETMySQLPlugin.Unload()
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
  at Arma2Net.Managed.AddInManager.UnloadAddIns()
07/06/2013 23:45:58 Info Loading addins
07/06/2013 23:45:58 Info Domain                        Name                Version   Publisher           Description
07/06/2013 23:45:58 Info Arma2NETMySQLPlugin           Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
07/06/2013 23:45:58 Info Arma2NETMySQLPlugin           Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
07/06/2013 23:45:58 Info BaseFunctionsPlugin           CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
07/06/2013 23:45:58 Info BaseFunctionsPlugin           ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
07/06/2013 23:45:58 Info BaseFunctionsPlugin           Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
07/06/2013 23:45:58 Info CommandLinePlugin             CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
07/06/2013 23:45:58 Info DateTimePlugin                DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
07/06/2013 23:45:58 Info ServerPlugIn                  ServerLocation      0.1.0.0   Tupolov             Returns the ARMA 2 server geo location.
07/06/2013 23:45:58 Info ServerPlugIn                  ServerName          0.1.0.0   Tupolov             Returns the ARMA 2 server name.
07/06/2013 23:45:58 Info ServerPlugIn                  ServerAddress       0.1.0.0   Tupolov             Returns the ARMA 2 server IP address.
07/06/2013 23:53:34 Log: Unmanaged side loaded
07/06/2013 23:53:34 Log: Failed to load Arma2Net.Managed.NLogger, falling back to Arma2Net.Managed.NullLogger
07/06/2013 23:53:34 Log: Arma2NET failed to initialize due to an exception of type System.IO.DirectoryNotFoundException
Log: System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Games\Retail Games\Bohemia Interactive\ArmA 2\expansion\beta\AddIns'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileSystemEnumerableIterator`1.CommonInit()
  at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
  at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
  at Arma2Net.Managed.AddInManager.FindAddInAssemblies()
  at Arma2Net.Managed.AddInManager.LoadAddIns()
  at Arma2Net.Managed.Bridge.Initialize()
07/06/2013 23:53:34 Log: Fatal unhandled exception of type System.TypeInitializationException
Log: System.TypeInitializationException: The type initializer for 'Arma2Net.Managed.Bridge' threw an exception. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Games\Retail Games\Bohemia Interactive\ArmA 2\expansion\beta\AddIns'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileSystemEnumerableIterator`1.CommonInit()
  at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
  at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
  at Arma2Net.Managed.AddInManager.FindAddInAssemblies()
  at Arma2Net.Managed.AddInManager.LoadAddIns()
  at Arma2Net.Managed.Bridge.Initialize()
  at Arma2Net.Managed.Bridge..cctor()
  --- End of inner exception stack trace ---
  at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize)
  at Arma2Net.Unmanaged.InvokeFunctionImpl(SByte* output, Int32 outputSize, SByte* function)
  at Arma2Net.Unmanaged.InvokeFunction(SByte* output, Int32 outputSize, SByte* function)

Edited by ColinM9991

Share this post


Link to post
Share on other sites

Try placing the dlls or the addin folder in your arma2 root folder (or the beta folder)

Share this post


Link to post
Share on other sites

That has gotten me further, however now I get this in rpt file

2013/07/07,  0:43:50 Error in expression <throw "System.IO.FileNotFoundException">
2013/07/07,  0:43:50   Error position: <throw "System.IO.FileNotFoundException">
2013/07/07,  0:43:50   Error 
2013/07/07,  0:43:53 ["PASS: _player: ",B 1-2-A:1 (ColinM) REMOTE]
2013/07/07,  0:43:53 ["PASS: _puid: ","2287169"]
2013/07/07,  0:43:53 ["PASS: _pname: ","ColinM"]
2013/07/07,  0:43:53 ["PASS: _playerSide: ",WEST]
2013/07/07,  0:43:53 String STR_EVAL_UNHANDLED_EXCEPTION not found
2013/07/07,  0:43:53 Error in expression <throw "System.IO.FileNotFoundException">
2013/07/07,  0:43:53   Error position: <throw "System.IO.FileNotFoundException">
2013/07/07,  0:43:53   Error 

And this in the ArmA2NET.log

07/07/2013 00:43:50 Log: Unmanaged side loaded
07/07/2013 00:43:50 Log: Failed to load Arma2Net.Managed.NLogger, falling back to Arma2Net.Managed.NullLogger

--Update--

Fixed by inserting NLog.dll file (Forgot to do so earlier),

Now testing with Databases.txt file in the ArmA2MySQL folder in AppData

--Update #2--

Problem solved, thank you Tupolov.

Edited by ColinM9991

Share this post


Link to post
Share on other sites

Can someone tell me why this is returning "[any]"?:

_result = call compile ("Arma2Net.Unmanaged" callExtension "EDDayOfWeek [getDay]");
diag_log _result;

plugin:

using Arma2Net.AddInProxy;
using System;

namespace EDDayOfWeekPlugin
{
   [AddIn("EDDayOfWeek")]
   public class EDDayOfWeek : AddIn
   {
       public string getDay()
       {
           DateTime saveNow = DateTime.Now;
           DateTime dt;
           dt = DateTime.SpecifyKind(saveNow, DateTimeKind.Local);
           String dtDay = dt.DayOfWeek.ToString("D");
           return dtDay;
       }
       public override string Invoke(string args, int maxResultSize) 
       { 
           return string.Concat(args);
       }
   }
}

I don't wish to pass any arguments, so if I could avoid the invoke stuff as much as possible, that's what I'm aiming for.

Edited by eagledude4

Share this post


Link to post
Share on other sites

Try

public override string Invoke(string args, int maxResultSize) 
{ 
   return DateTime.Now.DayOfWeek.ToString("D");
}

and

"Arma2Net.Unmanaged" callExtension "EDDayOfWeek"

Share this post


Link to post
Share on other sites

Thanks for getting back to me. Is it necessary to use call compile?

I'm seeing "4" being returned.

Edited by eagledude4

Share this post


Link to post
Share on other sites

If you want to compile/execute the string returned from Arma2NET as SQF code then yes. If you are just doing simple string operations, then usually not.

Share this post


Link to post
Share on other sites

Not at the moment since last I checked the callExtension sqf command only works on Windows servers.

Share this post


Link to post
Share on other sites
Not at the moment since last I checked the callExtension sqf command only works on Windows servers.

Can I use MariaDB on Windows instead of MySQL? Since MariaDB is a community fork of MySQL. Or can I Normalize the Database? I would love to normalize to 3NF if possible to improve performance.

Edited by LinuxMaster9

Share this post


Link to post
Share on other sites

You can use whatever database system you want. Arma2NET itself doesn't really have a bearing on this database stuff. Most of the actual work is left to the external plugins.

Share this post


Link to post
Share on other sites

Hi, I'm trying to get Arma2NET working in ARMA 3 0.77.109909

We have it set up and Arma2NET explorer is working fine with for example the DateTime plugin. It posts in the log and returns in the explorer as expected.

However when running a command like:

hint ("Arma2Net.Unmanaged" callExtension "DateTime ['now', 'HH:mm:ss dd/MM/yyyy']")

no hint appears in game. The log file reads

09/10/2013 00:09:21 Arma2NET 2.3.0.0 running on CLR 4.0.30319.17929
09/10/2013 00:09:21 Loaded into process arma3server
09/10/2013 00:09:21 Loading add-ins
09/10/2013 00:09:21 Caught exception of type System.Reflection.TargetInvocationException while loading add-in DefaultDomain
09/10/2013 00:09:21 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.88.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) ---> System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)
  --- End of inner exception stack trace ---
  at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
  at System.Reflection.Assembly.Load(Byte[] rawAssembly)
  at Arma2Net.Managed.AddInManager.DomainLoadAddIn(String assemblyFile)
  --- End of inner exception stack trace ---
  at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
  at System.Delegate.DynamicInvokeImpl(Object[] args)
  at Arma2Net.Managed.AddInManager.DomainDoCallback()
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
  at Arma2Net.Managed.AddInManager.DoCallbackImpl(AppDomain domain, Delegate func, Object arg)
  at Arma2Net.Managed.AddInManager.DoCallbackWithResult[T,TResult](AppDomain domain, Func`2 func, T arg)
  at Arma2Net.Managed.AddInManager.LoadAddIn(String assemblyFile)
09/10/2013 00:09:21 Domain                        Name                Version   Publisher           Description
09/10/2013 00:09:21 DefaultDomain                 Arma2NETMySQL       0.1.0.0   firefly2442         Runs MySQL procedure commands.
09/10/2013 00:09:21 DefaultDomain                 Arma2NETMySQLCommand0.1.0.0   firefly2442         Runs raw MySQL/SQLite commands
09/10/2013 00:09:21 DefaultDomain                 Arma2NETMySQLCommandAsync0.1.0.0   firefly2442         Runs asynchronous raw MySQL/SQLite commands
09/10/2013 00:09:21 DefaultDomain                 ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
09/10/2013 00:09:21 DefaultDomain                 CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
09/10/2013 00:09:21 DefaultDomain                 Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
09/10/2013 00:09:21 DefaultDomain                 GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
09/10/2013 00:09:21 DefaultDomain                 SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
09/10/2013 00:09:21 DefaultDomain                 CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
09/10/2013 00:09:21 DefaultDomain                 DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
09/10/2013 00:09:21 Arma2NET initialized in 00:00:00.0857371
09/10/2013 00:09:21 function: DateTime ['now', 'HH:mm:ss dd/MM/yyyy']
09/10/2013 00:09:21 maxResultSize: 10239
09/10/2013 00:09:21 Result size: 21
09/10/2013 00:09:21 Result: "00:09:21 10.09.2013"

The command is clearly issued from ARMA 3 but for some reason although the hint never appears. Am I missing something here? There is an exception being thrown to do with the sql plugin so that can't be the issue. I don't know what the default domain exception is though. Could that be something to do with it?

Thanks for any help!

Share this post


Link to post
Share on other sites
Did you add the @arma2net mod to your startup of Arma3?

Yep. It is definitely there. You can see in the log that the DateTime command is being called by ARMA 3 so Arma2NET has to be running.

Share this post


Link to post
Share on other sites

OK, I got as far as getting rid of the exceptions in the log by reinstalling version 2.3 but the hint is still not displaying. Here is the log now:

09/10/2013 17:12:51 Arma2NET 2.3.0.0 running on CLR 4.0.30319.17929
09/10/2013 17:12:51 Loaded into process arma3server
09/10/2013 17:12:51 Loading add-ins
09/10/2013 17:12:51 Domain                        Name                Version   Publisher           Description
09/10/2013 17:12:51 DefaultDomain                 ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
09/10/2013 17:12:51 DefaultDomain                 CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
09/10/2013 17:12:51 DefaultDomain                 Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
09/10/2013 17:12:51 DefaultDomain                 GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
09/10/2013 17:12:51 DefaultDomain                 SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
09/10/2013 17:12:51 DefaultDomain                 CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
09/10/2013 17:12:51 DefaultDomain                 DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
09/10/2013 17:12:51 Arma2NET initialized in 00:00:00.0342263
09/10/2013 17:12:51 function: DateTime ['now', 'HH:mm:ss dd/MM/yyyy']
09/10/2013 17:12:51 maxResultSize: 10239
09/10/2013 17:12:51 Result size: 21
09/10/2013 17:12:51 Result: "17:12:51 10.09.2013"

Share this post


Link to post
Share on other sites

I am an absolute noob when it comes to Arma scripting, so I apologize for my poor or understanding of this subject. I consider myself a comfortable C# programmer.

I am attempting to use this plugin while I learn about Arma scripting. I have setup the following to test the functionality (make sure I have the concept down).

I cant get this plugin to work at all, so obviously I am doing something wrong. I have worked my way through the errors in the Arma2NET log, and now I have a clean log.

09/22/2013 14:11:34 Arma2NET 2.3.0.0 running on CLR 4.0.30319.17929
09/22/2013 14:11:34 Loaded into process arma2oaserver
09/22/2013 14:11:34 Loading add-ins
09/22/2013 14:11:34 Domain                        Name                Version   Publisher           Description
09/22/2013 14:11:34 DefaultDomain                 ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
09/22/2013 14:11:34 DefaultDomain                 CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
09/22/2013 14:11:34 DefaultDomain                 Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
09/22/2013 14:11:34 DefaultDomain                 GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
09/22/2013 14:11:34 DefaultDomain                 SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
09/22/2013 14:11:34 DefaultDomain                 CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
09/22/2013 14:11:34 DefaultDomain                 DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
09/22/2013 14:11:34 Arma2NET initialized in 00:00:00.0212068
09/22/2013 14:11:34 function: Load
09/22/2013 14:11:34 maxResultSize: 10239
09/22/2013 14:11:34 Result size: 0
09/22/2013 14:11:34 Result: <null>
09/22/2013 14:14:04 function: Load
09/22/2013 14:14:04 maxResultSize: 10239
09/22/2013 14:14:04 Result size: 0
09/22/2013 14:14:04 Result: <null>
09/22/2013 14:53:09 Arma2NET 2.3.0.0 running on CLR 4.0.30319.17929
09/22/2013 14:53:09 Loaded into process arma2oaserver
09/22/2013 14:53:09 Loading add-ins
09/22/2013 14:53:09 Domain                        Name                Version   Publisher           Description
09/22/2013 14:53:09 DefaultDomain                 ClrVersion          2.0.0.0   Scott_NZ            Retrieves the version of the Common Language Runtime.
09/22/2013 14:53:09 DefaultDomain                 CompareVersion      2.0.0.0   Scott_NZ            Compares two version strings and returns an integer indicating how they compare.
09/22/2013 14:53:09 DefaultDomain                 Version             2.0.0.0   Scott_NZ            Returns the version of Arma2NET.
09/22/2013 14:53:09 DefaultDomain                 GetClipboardText    1.0.0.0   Scott_NZ            Gets the clipboard text value.
09/22/2013 14:53:09 DefaultDomain                 SetClipboardText    1.0.0.0   Scott_NZ            Sets the clipboard to a text value.
09/22/2013 14:53:09 DefaultDomain                 CommandLine         2.0.0.0   Scott_NZ            Returns the command line used to start the application.
09/22/2013 14:53:09 DefaultDomain                 DateTime            2.0.0.0   Scott_NZ            Returns the current date and time.
09/22/2013 14:53:09 Arma2NET initialized in 00:00:00.0202597
09/22/2013 14:53:09 function: Load
09/22/2013 14:53:09 maxResultSize: 10239
09/22/2013 14:53:09 Result size: 0
09/22/2013 14:53:09 Result: <null>

I am attempting to run the DateTime plugin on my DayZ Epoch server. I have init.sqf calling a SQF file that contains;

("Arma2Net.Unmanaged" callExtension "Load");

I then have a menu that calls this;

_dateTime = call compile ("Arma2Net.Unmanaged" callExtension "DateTime ['now', objNull]");
hint format ["The current system date and time is %1. TEST TEST TEST", _dateTime];

The hint that I see is;

"The current system date and time is <null>. TEST TEST TEST"

(I took this sample from the DateTimePluginDemo.Takistan.zip sample)

Obviously its missing the date, and I get <null> returned. Using this same method returns the desired string when I use Arma2NetExplorer.exe.

I am running;

Server 2008 R2

.net 4.5

Arma2 Version 1.62.103718

Arma2NET 2.3.0.0

Command;

"Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;@Arma2NET;"

Can someone point out what I have done wrong?

Edited by linuxx

Share this post


Link to post
Share on other sites

Arma2NET explorer is another nice way to test the plugin without having to load Arma. I would test with that first. You should also check the log files for @Arma2NET which you can find here: C:\Users\Username\AppData\Local\Arma2NET

Share this post


Link to post
Share on other sites
Arma2NET explorer is another nice way to test the plugin without having to load Arma. I would test with that first. You should also check the log files for @Arma2NET which you can find here: C:\Users\Username\AppData\Local\Arma2NET

I run the explorer and execute "DateTime ['now', objNull]", I receive the desired result. My logs are clean without any errors as noted above.

(I assume this post was in response to my post. If not, my bad.)

If you review my code above, am I doing everything correctly?

Share this post


Link to post
Share on other sites

I think you're very close. What if you remove the call compile portion?

_dateTime = "Arma2Net.Unmanaged" callExtension "DateTime ['now', objNull]"

The other possibility is it's getting confused evaluating the objNull? Maybe it's evaluating that as a straight string?

Share this post


Link to post
Share on other sites
I think you're very close. What if you remove the call compile portion?

_dateTime = "Arma2Net.Unmanaged" callExtension "DateTime ['now', objNull]"

The other possibility is it's getting confused evaluating the objNull? Maybe it's evaluating that as a straight string?

Thanks for helping!

I tried that, it returns;

"The current system date and time is . TEST TEST TEST" (no "null")

I also tried this (notice I removed the parentheses);

_dateTime = "Arma2Net.Unmanaged" callExtension "DateTime['now', objNull]";
_dateTimeCompiled = call compile _dateTime;
hint format ["The current system date and time is %1. TEST TEST TEST", _dateTimeCompiled];

I get;

"The current system date and time is <null>. TEST TEST TEST"

Share this post


Link to post
Share on other sites

I give it a shot when I get home tonight.

I want to say "at one point" I tried that. I've tried so many combinations, I cant remember what I've done anymore.

I do know, both ways work in the Arma2Net Explorer.

Thanks again for your help.

Share this post


Link to post
Share on other sites

That gives me;

"The current system date and time is any. TEST TEST TEST" (it added any)

I then though, perhaps its an array, so I tried;

_dateTime = "Arma2Net.Unmanaged" callExtension "DateTime ['now',]";
_dateTimeCompiled = call compile _dateTime;
hint format ["The current system date and time is %1. TEST TEST TEST", _dateTimeCompiled select 0];

And got the same result. I'm wondering if I am missing a pre-req, I think I have all of the runtimes.. Can you verify with my screenshot?

http://imgur.com/LLfddkg

Edited by linuxx

Share this post


Link to post
Share on other sites

I think I know what my issue is.

I have this plugin loaded on a server. I have the above code being called from a menu item initialized from the servers init.sqf file. I "think" this code is being executed from the client.

I now need to review BIS_MPF_remoteExecutionServer and http://community.bistudio.com/wiki/Multiplayer_framework

Sorry for wasting your time.

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

×