Description: A fully working, open-source Virtual Machine for the scripting language of the ArmA Games. How to use this thing? To start using the SQF-VM, you just have to double click the executable. Are there command line parameters available to eg. use this for unit-testing? Yes, there are. To get all, start the tool via command line and the parameter -? What is supported? To see what is supported in the specific build you are using, use the non-sqf compliant help command. The output of that command for version Alpha 0.1.0 I entered SQF with invalid syntax and the VM is outputting gibberish The SQF-VM project is not aiming to do any actual syntax checking. The tool expects valid SQF as input and invalid syntax might result in invalid execution stacks. I found a bug, what shall i do now? First of all: if it is due to invalid syntax not getting reported correctly, nothing. After that: Ensure all commands used are actually supported in your SQF-VM version using the help command If it is not caused due to invalid syntax or a missing command in the SQF-VM, try to narrow down the problem as much as you can and then head over to the github issues section to report the bug. The only exception to the above is a crash! Crashes you always can report I got a question that is not answered in here, what to do? Ask your question in this thread or in the discord channel and i might add it to this list Installation: Armaholic note: .dll files can harm your PC! Before running this you should make sure you understand the risks! Armaholic and its staff can never be held responsible when any file you download from our website causes any damages, disruption in services or anything else in any way! Downloading and installing these files is totally at your own risk! We have run anti-virus tools on the included files and found no issues but this is no guarantee! Armaholic note: .exe files can harm your PC! Before running this you should make sure you understand the risks! Armaholic and its staff can never be held responsible when any file you download from our website causes any damages, disruption in services or anything else in any way! Downloading and installing these files is totally at your own risk! Changelog: 1.3.2 (RC1) - CLI: Fixed `--max-instructions` no longer working - CLI: Added `--server PORT` (`-s PORT`) option to start the VM as a connectible server - CLI: Added `--define NAME[=VALUE]` (`-D NAME[=VALUE]`) allowing to add definitions to the PreProcessor - VM: `diag_tickTime` now returns time since VM start in seconds - VM: `assembly__ CODE` command no longer returns assembly reversed - VM: Removed invalid binary operator `ANY != ANY` - VM: Removed duplicate operators - VM: Renamed `exit__ SCALAR` to `exitcode__ SCALAR` due to naming conflict - VM: Renamed `prettyprintsqf__ STRING` to `prettysqf__ STRING` - VM: Fixed `scriptName STRING` setable multiple times - VM: Fixed `time` not being available (was already implemented) - VM: Fixed PreProcessor Endless loop - VM: Fixed PreProcessor double quoted strings no longer ignoring everything inbetween - VM: Fixed `catch` crash - VM: Fixed `STRING in ARRAY` was using case-insensitive comparison - VM: Fixed `ARRAY select ARRAY` error messsage (second type check outputted first type on error) - VM: Fixed `STRING select ARRAY` error messsage (second type check outputted first type on error) - VM: Fixed off-by-one error in `for STRING from SCALAR to SCALAR step SCALAR` when `step` was not equal to 1 or -1 - VM: Fixed code comparison was checking address space instead of on equality of instructions (`CODE isEqualTo CODE`) - VM: Fixed `alive OBJECT` erroring instead of returning `false` and just warning on `objNull` - VM: Fixed single `.` getting detected as number - VM: Fixed disabling `sleep SCALAR` and using it later would cause an infinite loop - VM: Fixed disabling warnings - VM: Fixed disabling runtime warnings would not properly disable them - VM: Fixed distance2d copy paste issue causing index out of range - VM: Fixed `isEqualTo` not doing reference == reference check first - VM: Fixed nil passed to command would error instead of warn - VM: Fixed unclosed `#ifdef` and `#ifndef` not warning and returning data. - VM: Fixed possible STATUS_STACK_BUFFER_OVERRUN on Windows Server due to console_width() - VM: Fixed including the same file multiple times triggered "Recursive include detected" - VM: Fixed code stringification having wrong parenthesis - VM: Fixed Nested `#ifdef` error being raised when include files got included inside `#ifdef`, `#ifndef` and `#else` block. - VM: Fixed Taling Slash in virtual mappings would prevent mappings from working - VM: Added support for 2-Dimensional `distance` - VM: Added `waitUntil CODE` operator - VM: Added `ARRAY distance2d ARRAY` operator - VM: Added `OBJECT distance2d ARRAY` operator - VM: Added `ARRAY distance2d OBJECT` operator - VM: Added `OBJECT distance2d OBJECT` operator - VM: Added `ANY execVM STRING` and `execVM STRING` - VM: Added Warning on undefined-variable usage - VM: Added `CODE provide__ ARRAY` to allow to provide implementation for an operator - VM: Added `terminate SCRIPT` operator - VM: Added `STRING splitString STRING` operator - VM: Added `ARRAY deleteRange ARRAY` - VM: Added `assembly__ STRING` variant of `assembly__ CODE` - VM: Added `tree__ CODE` variant of `tree__ STRING` - VM: Added `prettysqf__ CODE` variant of `prettysqf__ STRING` - VM: Added `pretty__ CODE` alias of `prettysqf__ CODE` - VM: Added `STRING in STRING` - VM: Added `remoteConnect__ STRING` to connect to a SQF-VM instance running as server - VM: Added `copyToClipboard STRING` - VM: Added `scopeName STRING` 1.2.2 (RC1) - CLI: Added `--command-dummy-nular name` to add dummy commands. - CLI: Added `--command-dummy-unary name` to add dummy commands. - CLI: Added `--command-dummy-binary 4|name` to add dummy commands. - CLI: Added `--no-assembly-creation` which allows to disable the creation of executable assembly (useful for `--parse-only` as it will enhance the speed) - VM: Error messages of preproc now contain line, col and file info - VM: SQF-Parsing performance improvement - VM: File System Overhauled - VM: Changed library load failed message - VM: All filepaths printed now are absolute. - VM: Added warning on data after `#include` - VM: Added `assembly__ CODE` unary operator - VM: Added `createMarker [STRING, OBJECT]` - VM: Added `__LINE__` and `__FILE__` support for PreProcessor - VM: Fixed crash when not providing enough params in preproc - VM: Fixed `--parse-only` returning `-1` as exit code - VM: Fixed parser not detecting eg. `.5` - VM: Fixed numbers with tailing `-` operator, are parsed invalidly - VM: Fixed `/*/` getting parsed as open & close block comment - VM: Fixed `###R` not producing `#R` - VM: Fixed macro with args blocking same text without args - VM: Fixed commas in strings invalidly getting parsed as separator for macros - VM: Fixed local path not properly working with #include - VM: Fixed #file macro getting `]\t` attached - VM: Fixed Number Exponent parsing bug - VM: Fixed `ceil` being recognized as `cei` - VM: Fixed immediate \ after macro name not getting read proper - VM: Fixed `#ifdef` etc. still allowing strings when false - VM: Fixed `in` always returning true - VM: Fixed `isNil CODE` causing an endless loop - VM: Fixed CODE type getting constructed wrong, causing the work stack to never be emptied - VM: Fixed calling code wiped current variable stack. - VM: Fixed missing l on null for null objects - VM: Fixed passing nil would sometimes still execute an unary or binary operator - VM: Fixed getvariable returning wrong value type if nil - VM: Fixed `callExtension` required file extension on linux - VM: Fixed `ARRAY select SCALAR` erroring on index == size - VM: Fixed crash when numbers exceeded valid range (`std::out_of_range` now gets catched and a `NaN` type is created. Warning gets emitted) - VM: Fixed `createMarker ARRAY` is returning first value of position instead of string 1.2 (RC1) - DebuggerCLI: now accepts arrowkeys for navigation - DebuggerCLI: Minor fixes & help changes - DebuggerCLI: decodemsg and displaysend now print their current value when used without any argument - ArmA File-System - Preprocessor Support - Added command loadFile - Added commands preprocessFileLineNumbers and preprocessFile (alias) - All code typed into the commandline now gets preprocessed - -F <PATH> and -f <PATH> now preprocess the file first - Added --no-load-execdir to disable automatical addition of local directory to the allowed paths to load from list. - Added -l <PATH>(--load <PATH>) to add allowed path - Added -p <PATH> (--preprocess <PATH>) to preprocess a file and just output it to console - Added command isKindOf in all its 3 forms - Fixed createUnit may cause errors when a rank is provided. - Added support to relative path for -F and -f - Added -v PATH|VIRT (--virtual PATH|VIRT) to add virtual file system mappings - Added --cli-file PATH to allow to load args from a file - Config parser now can "parse" magic strings (just searches for the first occurance of ;) - Now executing SQF (added via -f or -r) before first user prompt instead of when the user entered his very own code. - Fixed empty files cause segfaults - Implemented scriptName <STRING> command - Implemented <ANY> in <ARRAY> - Implemented param command - Implemented player command and respawn__ internal command to respawn (recreate) a player - Implemented setDamage, getDammage, damage and alive - Implemented preprocess__ command to allow preprocessing strings - Fixed params reporting false error when passing arraycount - Fixed params invalidly reporting a warning telling the type is not matching expected datatypes - Fixed codeblocks not accepting ; at start (eg. {;} was marked as invalid) - Fixed allVariables, setVariable and getVariable for use with OBJECT and GROUP - Added --preprocess-file <PATH> (-E <PATH>) - Added do-preprocess to debugger interface - Replaced --start-server (-s) and --server-port <int> (-p <int>) with --debugger <int> (-d <int>) - Implemented crew <OBJECT> command - Implemented vehicle <OBJECT> command - Implemented objectParent <OBJECT> command - Implemented unary commands gunner, commander and driver expecting OBJECT - Implemented <OBJECT> in <OBJECT> command - Fixed format stringifying strings - Implemented <CODE> except__ <CODE> to catch runtime exceptions thrown by the VM 1.1 (RC1) - Continuous CLI (exit__ command now needs to be used) - Fixed String-Parsing (had problems handling "somethingendingwith'") - Fixed : not getting recognized - Config checking is no longer enabled by default (-c flag now enables config checking instead of disabling it) - Fixed some debugger-related stuff - Now contains DebuggerCLI application (sqfvm needs to be started with -s -p 9090 for it to work) - added nearestObjects - added distance - Debugger interface error messages now have status error - Debugger interface now prints output with status message - Debugger interface no longer prints the status change twice when hitting breakmode - Icon was updated (Currently disabled though due to new CMakeList.txt) - Added isNull <OBJECT> isNull <GROUP> isNull <CONFIG> - Fixed config commands causing segfaults - Fixed spawning things prevented further stack execution - Fixed spawned scopes are not reporting to be schedulable - Fixed params unary will error-out on non-array _this param - Added sleep command & corresponding code - Added canSuspend - Fixed some internal method to check array types - Added Marker-System and corresponding commands: [ allMapMarkers, createMarker, createMarkerLocal, deleteMarker, deleteMarkerLocal, getMarkerColor, getMarkerPos, getMarkerSize, getMarkerType, markerAlpha, markerBrush, markerColor, markerDir, markerPos, markerShape, markerSize, markerText, markerType, setMarkerAlpha, setMarkerAlphaLocal, setMarkerBrush, setMarkerBrushLocal, setMarkerColor, setMarkerColorLocal, setMarkerDir, setMarkerDirLocal, setMarkerPos, setMarkerPosLocal, setMarkerShape, setMarkerShapeLocal, setMarkerSize, setMarkerSizeLocal, setMarkerText, setMarkerTextLocal, setMarkerType, setMarkerTypeLocal ] - productVersion now outputs full version information - productVersion now will tell properly if it is x64 or x86 (or NA on some compilers and systems) - Added side <OBJECT> and side <GROUP> - DllExports no longer allow sleep - Fixed _this not getting set properly in <ANY> call <CODE> - Added vm__ command to get a list of vm-only commands - Added cmdsimplemented__ command to get a list of actually implemented commands (checks for missing description and ommits those) - Added allUnits - No longer printing space inbetween array commas when stringified - implemented toFixed - Fixed <ARRAY> select <BOOL> help message - fixed pretty printing would not add a space character between private and the variable - altered the "greeting" message on prompt - fixed -s debugging server not connecting - implemented <ARRAY> pushBackUnique <ANY> - implemented <ARRAY> findIf <CODE> - fixed SQF parser was detecting expressions like _x == 1 as assignment - fixed non-scheduled execution was continuing executing after error - fixed scheduled execution was not continuing executing after error 1.0.0 0.1.4-alpha https://github.com/X39/sqf-vm/releases/tag/0.1.4-alpha 0.1.3-alpha Added allGroups nullar Added createUnit and units command fix Added groupId command and fixed stuff related to commits since adding deletevehicle added createGroup and deleteGroup enhanced examples for isNil Added deleteVehicle fixxed memory leak on call to deleteInner Implemented isNil Added params command fixed if unary command has binary version and is on righthand side of assignment the binary one would be picked altered instruction count note now using vm->stack for all errors in *_stack functions fixed crash when assigning empty to variable (due to code block ending with assignment) fixed crash when assigning empty to variable (due to code block ending with assignment) fixed segfault on large print output due to alloca usage Added instruction count output to sqf-vm fixed order of array-creating commands being inversed removed duplicate declaration of arr Replaced instruction adding of arrays by array_push calls No more tailing zeros fixed error on invalid type for toString Added toArray and toString fixed invalid usage strings Merge branch 'master' of https://github.com/X39/sqf-vm.git added execution on channels starting with sqf systemChat and hint no longer output (null) on empty strings fixed precedence of all commands added `systemChat` and `hint` added isEqualType Merge branch 'master' of https://github.com/X39/sqf-vm.git Merge pull request #9 from Dahlgren/bugfix/malloc malloc.h does not exist in standard C, use stdlib.h Added `<ARRAY> select <BOOL>` fixed `help__ "||"` usage fucks up due to | being splitter here fixed if unary and nullar exist for same command, nullar gets picked if nothing is on right hand Fixed memory leaks & out-of-memory crashes due to strings too large stringification of null string wont crash anymore Added examples to compile Added compile command Moved check into correct command Added empty string check to help__ Altered error message Now always checking for all commands to prevent binary commands being interpreted as variable Fixed stringification of strings and added empty string check to set- and getVariable Added empty string check to help__ Improved debug informations snippet Hashing is no longer case sensitive fixed examples of `help__` and added removed unused variable fixed `help__ <STRING>` formatting fixed warnings & fixed invalid method usage fixed memory leaks Added `with` command Added AllVariables Added proper support for removing variables added `nil` command fixed example of `<CODE> count <ARRAY>` Further style changes to help__ fixed examples not getting printed fixed warnings doomed keyboard ... Implemented extra info into `help__ <STRING>` and now outputting usage instead of description in `help__` fixed order off `<ARRA> - <ARRAY>` fixed create_command error Added more description to commands Added support for `<ARRAY> - <ARRAY>`; `==` and `!=` now properly error out on missmatching types fixed missing righthand on typename segfaults forgot to add the check if nothing was found Added note when nothing was found to `help__` and added header Added `help__` unary variant Did stuff doMove now supports array syntax Added objNull Added null check to objects POBJECT object_create(const char* classname) is exposed again Added ccomment placeholder for WITH type in is_equal_to fixed is_equal_to for objects Added stringify cases for NOTHING and ANY More stringify & isEqualTo type compatibility added side to stringify Added side commands Added SQF stupidity that `,` also can be used to terminate instead of `;` fix of merge merge fixed issues i didnt see thx to visual studio not building properly ... Altered productname & upped build number Upped version Added VEHICLE & UNIT inner-objects to OBJECT removed bool.h Added SIDE type Added garbage fix for gcc on debian trash glibc implementation bullshittery added return for non-windows machines removed unneded variable, renamed variable Merge branch 'master' of https://github.com/X39/sqf-vm Added missing blank Cleaned up warnings fixed crash due to uninitialized variable Merge branch 'master' of https://github.com/X39/sqf-vm Added FAQ fixed private <string> Added NAN to log -1 and unary + Added doMove alpha 0.1.2 Added more checks to FOR fix re-fixed endless attempt to parse empty blocks Added Switch case do Added ForEach fixed parser fix Moved OBJECT type into its own file fixed array parsing Fixed array order Added productversion added missing comparison types to ==, added != Added velocity and setVelocity Added getPos, position and setPos Added typeOf added setVariable & getVariable malloc sizeof from pointer to actual struct fixed invalid malloc sizeof fixed copy-paste error Added createVehicle Added OBJECT type fixed last token getting proper textrange info fixed empty string not terminated segfault unterminated strings are no longer trimmed by 2 chars Added COUNT type to vm types alpha 0.1.1 fixed strcmpi undefined fixed warnings fixed sm_get_value_index function Added isEqualTo Fixed warnings renamed `COUNT` type to `COUNT__` renamed `help` command to `help__` Fixed issue caused by deallocated commands in code stacks on global variables Cleaned up files removed comment Improved code_type performance Added c function to compare two items for equality Added set command only admins now can execute commands Added pushBack command <ARRAY> select <ARRAY-SIZE> now properly pushes a nothing to the stack Fixed empty value assignment crashing Merge branch 'master' of https://github.com/X39/sqf-vm.git fixed bot replaced test 2k with 0 fixed index out of range for select; fixed zero divisor fixed max length for buffer Added decode to string to remove python bullshittery nonsense fixed bot added missing ')' fixed python bot removed unneeded vars code fix more code fixes further fix fixed error declaration & renamed to orig_error Fixed buffer passing fixed syntax replaced tabs with spaces updated python bot Moved commands into separate file, added special print function to sqfvm fixed format stringifying strings removed unneeded variables from cmd_comment fixed empty string concat Now always including <limits.h> Merge branch 'master' of https://github.com/X39/sqf-vm.git fixed entry.c for gcc Fixed MemoryLeaks removed module feedparser Added -s param to change the max instructions limit fixed command callback ptr of comment function added `comment` command Added comment support to tokenizer Added ^ and % to tokenizer Added ^ command Added alternative syntax to and & or Added mod alias `%` Fixed description of atan2, min, max and mod fixed mod, max, min and atan2 being registered as unary commands instead of binary Added `!` unary command Updated help texts changed build name Alpha 0.1.0 -/- Forum topic: - BI forums Enable javascript to be able to download from Armaholic please! |