Search the Community
Showing results for tags 'exec'.
Found 1 result
I could not find any ArmA2 debug tool that worked with Epoch so I developed my own little script and dialog to do just some simple things like execute SQF code on the fly (client and server side via custom remote execution). Also I have added my own little extension (DLL) for remote logging to a separate window on the server, so essentially if you want to log some debug info it pops up in that window and not in the RPT file. That logging extension is optional of course but i use it for debgging myself, not on the live server. Is there any interest in tools like this? I can publish my stuff if any admin or script/mod developer may need something like this.. :) Here a simple screenshot what the debug dialog looks like atm: you can enter any valid SQF script code in the large text field and then execute it locally on the client or via remote execution on the server, the result of the code is displayed in the lower text field (also the result of remote exec), just to simplify it so you won't have to add a log call or "hint str (1+2+3)" instead of just call "1+2+3" or whatever (and yes you can use this as a calculator lol) some screenshots of the remote log: I've just added a simple log filter at the bottom, so you are able to filter the log entries to match a specified text in real time. the number in the bottom right cornor means 9 log entries filters out of 26 log entries overall. this ain't pretty but might help with script debugging a lot. the code to log something in this example is pretty simple: format["Refueling %1 with %2 fuel",_name,_fuel] call DT_fnc_log; this is called in my service point refuel script, just as an example how it can be used (keep in mind the refuel script is client side and the log window on the server). :) Download: http://dl.bintray.com/vos/dayz/ArmaDebugTool1.0.zip Installation Script Console copy the files RscDebugDialog.hpp and debug.sqf to your MPMission folder/PBO open your description.ext file and include the debug dialog at the end of the file like this: #include "RscDebugDialog.hpp" execute the debug.sqf from your init.sqf (at the very bottom it needs to be executed on the client and server) execVM "debug.sqf"; you can open the debug console by invoking the function DT_fnc_openDialog yourself or by default just press the minus key on the numpad to open it if you are in-game (key can be changed with DT_openKey variable in the debug.sqf file) call DT_fnc_openDialog; you can now use the debug console in game, be aware the custom remote execution on the server might be tricky if you leave BattlEye enabled because many script values are just blacklisted in the publicvariableval.txt filter file, also you need to add BattlEye exceptions for publicvariable.txt: !="DT_logMessage" !="DT_remoteExec" I suggest to just disable BattlEye if you want to make use of the remote execution, since this script is only intended for use on a test server anyway ond not for a live server! If you want to use this on a live server make sure only admins have access to the script console! :P Installation Remote Log Extension (optional) If you want to use the external log window in combination with my log command DT_fnc_log you need to install the extension first. By default the log window is displayed on the server only, it can be used on the client but on the server makes more sense I think. The following steps are only server side! copy the files jni.dll, jni.conf and ArmaDebugTool.jar in your ArmA:OA installation directory (next to Database.dll and the other Epoch files) since the extension is written in Java you need to install a 32-bit (x86) Java 7 Runtime Environment (JRE), if you don't already have that on your server open the jni.conf and change the JAVA_HOME path to your JRE installation if necessary that should be all, you can now use the DT_fnc_log function on the client or server and it should open a separate window with the first log call. e.g. "log text" call DT_fnc_log; (position player) call DT_fnc_log; // on the client (count vehicles) call DT_fnc_log; // server or client or whatever you want to log, string conversion is done automatically so you can log any value or object. If there are any problems with calling the ArmaDebugTool.jar or Java-VM there should be a jni.log file next to the jni.dll with error information in it. Also for performance reasons the log window is limited to 1000 log entries, it will remove the oldest one from the top if you log more messages. References The Java Extension for Arma 3 (jni.dll) was created by micovery: http://forums.bistudio.com/showthread.php?167749-Java-Extension-for-Arma-3-(jni-dll) Source code for my debug scripts: https://github.com/vos/dayz/tree/master/debug Source code for the log extension (ArmaDebugTool.jar): https://github.com/vos/ArmaDebugTool