Releases: SQFvm/runtime
Releases · SQFvm/runtime
1.3.2-RC1
IMPORTANT NOTE
PLEASE DO READ THE FOLLOWING
The SQF-VM project stopped releasing "handcrafted builds" in favor of utilizing CI. Please head over to the Actions tab and download the latest binaries from one of the releases listen in there.
Changelog
- 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
toexitcode__ SCALAR
due to naming conflict - VM: Renamed
prettyprintsqf__ STRING
toprettysqf__ 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
whenstep
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 returningfalse
and just warning onobjNull
- 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
andexecVM 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 ofassembly__ CODE
- VM: Added
tree__ CODE
variant oftree__ STRING
- VM: Added
prettysqf__ CODE
variant ofprettysqf__ STRING
- VM: Added
pretty__ CODE
alias ofprettysqf__ 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.3.1-RC1
Changelog
- CLI: Added
--disable-macro-warnings
to disable#undef
and#define
warnings. - CLI: Added
--disable-runtime-warnings
to disable runtime warnings - VM: Added nular
time
operator - VM: Added default defines
_SQF_VM
,_SQF_VM_MAJOR
,_SQF_VM_MINOR
,_SQF_VM_REVISION
- VM: Added
callstack__
command that returns the whole callstack in an array. - VM: Added additional warning messages to all callstacks
- VM: Added
allFiles__ [STRING]
command that allows to receive all files in current paths - VM: Added
pwd__
command that returns current file - VM: Added
currentDirectory__
command that returns current file's directory - VM: Added
trim__ STRING
command - VM: Added
exit__ SCALAR
command to allow for exit codes in VM scripts - VM: Added
try CODE
command - VM: Added
EXCEPTION catch CODE
command - VM: Added
throw ANY
command - VM: Added functionality to stringify code
- VM: Fixed duplicate defines did not error
- VM: Fixed
isNil STRING
only checking local variables scope (global variables have been ignored) - VM: Fixed default function parameters not working when accepted type list is provided (
params
) - VM: Fixed crash on
[1] select true
- VM: Fixed
[1, 2, 3] select 1.6
would get floored instead of rounded - VM: Fixed
"12345" select [0.6, 3]
would get floored instead of rounded - VM: Fixed
[1, 2, 3, 4, 5] select [0]
would return everything instead of nothing - VM: Fixed
ARRAY select ARRAY
would floor numbers instead of rounding - VM: Fixed wrong return value for
ARRAY select ARRAY
on eg.[] select [10, 10]
- VM: Fixed
preprocessFile*
commands lacked file information when compiled - VM: Fixed
1 / 0
would not raise a warning message - VM: Fixed
ARRAY deleteAt SCALAR
would not return deleted value - VM:
#undef
with a non-defined macro no longer errors (now a warning instead) - VM
#define
when another with the same name already existed no longer errors (now a warning instead) - VM:
CODE except__ CODE
now also has a_callstack
variable that contains the callstack - VM: Changed how callstacks (scopes) work in SQF-VM internally
- VM: Tabs now will be replaced by spaces in error messages
- VM: Rewrote macro expander (PreProcessor)
Help Output
.\sqfvm.exe --help
USAGE:
C:\@X39\vm\RelWithDebInfo\sqfvm.exe [-h] [--version] [--] [--cli-file
<PATH>] [-i <PATH>] ...
[--input-sqf <PATH>] ...
[--input-config <PATH>] ...
[--input-pbo <PATH>] ... [--sqf
<CODE>] ... [--config <CODE>] ...
[--pretty-print <PATH>] ... [-E
<PATH>] ... [--command-dummy-nular
<NAME>] ... [--command-dummy-unary
<NAME>] ...
[--command-dummy-binary <PRECEDENCE
|NAME>] ... [-a] [-d <PORT>] [-m
<NUMBER>] [-c]
[--disable-macro-warnings]
[--disable-runtime-warnings] [-l
<PATH>] ... [-v <PATH|VIRTUAL>]
... [--verbose] [--parse-only]
[--no-work-print]
[--no-execute-print]
[--no-load-execdir]
[--no-assembly-creation]
Where:
-h, --help
Displays usage information and exits.
--version
Displays version information and exits.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--cli-file <PATH>
Allows to provide a file from which to load arguments from. If passed,
all other arguments will be ignored! Each argument needs to be
separated by line-feed. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.
-i <PATH>, --input <PATH> (accepted multiple times)
Loads provided file from disk. File-Type is determined using default
file extensions (sqf, cpp, hpp, pbo). Supports absolut and relative
pathing using '.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-sqf <PATH> (accepted multiple times)
Loads provided SQF file from disk. Will be executed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-config <PATH> (accepted multiple times)
Loads provided config file from disk. Will be parsed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-pbo <PATH> (accepted multiple times)
Loads provided PBO file from disk. Will be parsed before files, added
using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--sqf <CODE> (accepted multiple times)
Loads provided sqf-code directly into the VM. Input is not getting
preprocessed!
--config <CODE> (accepted multiple times)
Loads provided config-code directly into the VM. Input is not getting
preprocessed!
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.!BE
AWARE! This is case-sensitive!
-E <PATH>, --preprocess-file <PATH> (accepted multiple times)
Runs the preprocessor on provided file and prints it to stdout.
Supports absolut and relative pathing using '.\path\to\file' or
'C:\path\to\file'.!BE AWARE! This is case-sensitive!
--command-dummy-nular <NAME> (accepted multiple times)
Adds the provided command as dummy.
--command-dummy-unary <NAME> (accepted multiple times)
Adds the provided command as dummy.
--command-dummy-binary <PRECEDENCE|NAME> (accepted multiple times)
Adds the provided command as dummy. Note that you need to also provide
a precedence. Example: 4|commandname
-a, --automated
Disables all possible prompts.
-d <PORT>, --debugger <PORT>
Causes the sqf-vm to start a network server that allows to attach a
single debugger to it.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-c, --check-classnames
Enables the config checking for eg. createVehicle.
--disable-macro-warnings
Disables the warning for duplicate defines and undefines without a
corresponding define.
--disable-runtime-warnings
Disables the runtime warning messages raised by SQF-VM.
-l <PATH>, --load <PATH> (accepted multiple times)
Adds provided path to the allowed locations list. Supports absolut and
relative pathing using '.\path\to\file' or 'C:\path\to\file'.
An allowed location, is a location SQF-VM will be allowed to load
files from.If you try to load a file from a given directory that is
not in the allowed list,the file loading WILL fail.Only the root path
of a given folder needs to be added, sub-folders are accessible
automatically.!BE AWARE! This is case-sensitive!
-v <PATH|VIRTUAL>, --virtual <PATH|VIRTUAL> (accepted multiple times)
Creates a mapping for a virtual and a physical path.Mapping is
separated by a '|', with the left side being the physical, and the
right argument the virtual path. Supports absolut and relative pathing
using '.\path\to\file' or 'C:\path\to\file'.
--verbose
Enables additional output.
--parse-only
Disables all code execution entirely and performs only the parsing &
assembly generation tasks. Note that this also will prevent the
debugger to start. To disable assembly generation too, refer to
--no-assembly-creation.
--no-work-print
Disables the printing of all values which are on the work stack.
--no-execute-print
Disables the `Executing...` and two horizontal lines hint printing.
--no-load-execdir
Prevents automatically adding the workspace to the path of allowed
locations.
--no-assembly-creation
Will force to use only the SQF parser. Execution of SQF-code will not
work with this. Useful, if one only wants to perform syntax checks.
Emulates the ArmA-Series SQF environment.
Supported Commands
[
["n","parsingnamespace"],
["n","pi"],
["n","sidelogic"],
["n","nil"],
["n","sideunknown"],
["n","east"],
["n","missionnamespace"],
["n","uinamespace"],
["n","profilenamespace"],
["n","resistance"],
["n","player"],
["n","productversion"],
["n","exit__"],
["n","cansuspend"],
["n","allunits"],
["n","diag_ticktime"],
["n","halt"],
["n","cmds__"],
["n","cmdsimplemented__"],
["n","allobjects__"],
["n","vm__"],
["n","respawn__"],
["n","grpnull"],
["n","callstack__"],
["n","pwd__"],
["n","currentdirectory__"],
["n","true"],
["n","false"],
["n","confignull"],
["n","configfile"],
["n","blufor"],
["n","allmapmarkers"],
["n","west"],
["n","opfor"]...
1.2.2-RC1
Changelog
- 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
Help output
.\sqfvm.exe --help
USAGE:
D:\Git\SQFvm\RELEASE-FOLDER\SQF-VM\x86\sqfvm.exe [-h] [--version] [--]
[--cli-file <PATH>] [-i <PATH>] ...
[--input-sqf <PATH>] ...
[--input-config <PATH>] ...
[--input-pbo <PATH>] ... [--sqf
<CODE>] ... [--config <CODE>] ...
[--pretty-print <PATH>] ... [-E
<PATH>] ... [--command-dummy-nular
<NAME>] ... [--command-dummy-unary
<NAME>] ...
[--command-dummy-binary <PRECEDENCE
|NAME>] ... [-a] [-d <PORT>] [-m
<NUMBER>] [-c] [-l <PATH>] ... [-v
<PATH|VIRTUAL>] ... [--verbose]
[--parse-only] [--no-work-print]
[--no-execute-print]
[--no-load-execdir]
[--no-assembly-creation]
Where:
-h, --help
Displays usage information and exits.
--version
Displays version information and exits.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--cli-file <PATH>
Allows to provide a file from which to load arguments from. If passed,
all other arguments will be ignored! Each argument needs to be
separated by line-feed. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.
-i <PATH>, --input <PATH> (accepted multiple times)
Loads provided file from disk. File-Type is determined using default
file extensions (sqf, cpp, hpp, pbo). Supports absolut and relative
pathing using '.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-sqf <PATH> (accepted multiple times)
Loads provided SQF file from disk. Will be executed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-config <PATH> (accepted multiple times)
Loads provided config file from disk. Will be parsed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-pbo <PATH> (accepted multiple times)
Loads provided PBO file from disk. Will be parsed before files, added
using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--sqf <CODE> (accepted multiple times)
Loads provided sqf-code directly into the VM. Input is not getting
preprocessed!
--config <CODE> (accepted multiple times)
Loads provided config-code directly into the VM. Input is not getting
preprocessed!
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.!BE
AWARE! This is case-sensitive!
-E <PATH>, --preprocess-file <PATH> (accepted multiple times)
Runs the preprocessor on provided file and prints it to stdout.
Supports absolut and relative pathing using '.\path\to\file' or
'C:\path\to\file'.!BE AWARE! This is case-sensitive!
--command-dummy-nular <NAME> (accepted multiple times)
Adds the provided command as dummy.
--command-dummy-unary <NAME> (accepted multiple times)
Adds the provided command as dummy.
--command-dummy-binary <PRECEDENCE|NAME> (accepted multiple times)
Adds the provided command as dummy. Note that you need to also provide
a precedence. Example: 4|commandname
-a, --automated
Disables all possible prompts.
-d <PORT>, --debugger <PORT>
Causes the sqf-vm to start a network server that allows to attach a
single debugger to it.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-c, --check-classnames
Enables the config checking for eg. createVehicle.
-l <PATH>, --load <PATH> (accepted multiple times)
Adds provided path to the allowed locations list. Supports absolut and
relative pathing using '.\path\to\file' or 'C:\path\to\file'.
An allowed location, is a location SQF-VM will be allowed to load
files from.If you try to load a file from a given directory that is
not in the allowed list,the file loading WILL fail.Only the root path
of a given folder needs to be added, sub-folders are accessible
automatically.!BE AWARE! This is case-sensitive!
-v <PATH|VIRTUAL>, --virtual <PATH|VIRTUAL> (accepted multiple times)
Creates a mapping for a virtual and a physical path.Mapping is
separated by a '|', with the left side being the physical, and the
right argument the virtual path. Supports absolut and relative pathing
using '.\path\to\file' or 'C:\path\to\file'.
--verbose
Enables additional output.
--parse-only
Disables all code execution entirely and performs only the parsing &
assembly generation tasks. Note that this also will prevent the
debugger to start. To disable assembly generation too, refer to
--no-assembly-creation.
--no-work-print
Disables the printing of all values which are on the work stack.
--no-execute-print
Disables the `Executing...` and two horizontal lines hint printing.
--no-load-execdir
Prevents automatically adding the workspace to the path of allowed
locations.
--no-assembly-creation
Will force to use only the SQF parser. Execution of SQF-code will not
work with this. Useful, if one only wants to perform syntax checks.
Emulates the ArmA-Series SQF environment.
Supported Commands
[
["n","parsingnamespace"],
["n","pi"],
["n","sidelogic"],
["n","nil"],
["n","east"],
["n","missionnamespace"],
["n","uinamespace"],
["n","profilenamespace"],
["n","resistance"],
["n","player"],
["n","productversion"],
["n","allunits"],
["n","diag_ticktime"],
["n","exit__"],
["n","cansuspend"],
["n","halt"],
["n","cmds__"],
["n","cmdsimplemented__"],
["n","allobjects__"],
["n","vm__"],
["n","respawn__"],
["n","true"],
["n","false"],
["n","confignull"],
["n","configfile"],
["n","blufor"],
["n","allmapmarkers"],
["n","west"],
["n","opfor"],
["n","independent"],
["n","civilian"],
["n","sideempty"],
["n","sideenemy"],
["n","sidefriendly"],
["n","sideunknown"],
["n","grpnull"],
["n","objnull"],
["u","abs","SCALAR"],
["u","sqrt","SCALAR"],
["u","preprocessfilelinenumbers","STRING"],
["u","deg","SCALAR"],
["u","acos","SCALAR"],
["u","assembly__","CODE"],
...
1.2.1-RC3
Changelog
- CLI: Removed `-f` alias of `--sqf-file PATH`
- CLI: Removed `-F` alias of `--config-file PATH`
- CLI: Removed `-n` alias of `--no-print`
- CLI: Removed `-N` alias of `--no-execute-print`
- CLI: Removed `-r` alias of `--sqf-code CODE`
- CLI: Removed `-R` alias of `--config-code CODE`
- CLI: Renamed `--no-prompt` to `--automated`
- CLI: Renamed `--no-print` to `--no-work-print`
- CLI: Renamed `--sqf-code CODE` to `--sqf CODE`
- CLI: Renamed `--config-code CODE` to `--config CODE`
- CLI: Renamed `--config-file PATH` to `--input-config PATH`
- CLI: Renamed `--sqf-file PATH` to `--input-sqf PATH`
- CLI: Renamed `--enable-classname-check` to `--check-classnames`
- CLI: Added `--input PATH` (`-i PATH`) to load supported files
- CLI: Added `--input-pbo PATH` to load supported pbo files
- CLI: Added `--parse-only` option, to disable the execution of SQF code.
- CLI: Fixed `--debugger <PORT>` always attempting to launch at port 1
- VM: Now using working directory instead of executable directory for relative paths
- VM: Line-Errors now start at 1 instead of 0
- VM: Path now is displayed the same way for parsing issues as it is for runtime issues
- VM: Improved config parsing performance
- VM: Implemented `<STRING> configClasses <CONFIG>`
- VM: Implemented `configProperties <ARRAY>`
- VM: Improved error messages on runtime_error (affected command: `callExtension`)
- VM: Library names no longer can contain `/` or `\`
- VM: Added `assert <BOOL>`
- VM: Added `halt`
- VM: Added `<ARRAY> # <SCALAR>`
- VM: Fixed `apply` operator crashing
- VM: Fixed `nil` being printed as `ni`
- VM: Fixed relative pathing on Linux
- VM: Fixed potential crash when cli-file was not found
- VM: Fixed potential crash on invalid filesystem usage
- VM: Fixed undetected PreProcessing instructions
- VM: Fixed filesystem `..` messup when using backslashes
- VM: Fixed filesystem nagivation issues with relative pathing
- VM: Fixed path is not getting displayed on operators
- VM: Fixed PreProcessing messing up linecount when `\r` is encountered
- VM: Fixed Circular Parenthood error in config
- VM: Fixed end of parsing before EOF was not erroring
- VM: Fixed missing `L` on error outputs (eg. `[ERR][5|C5]` instead of `[ERR][L5|C5]`)
- VM: Fixed `<object> in <object>`
- VM: Fixed `SCALAR toFixed SCALAR` missing tailing zeros
- VM: Fixed `for` var did not included `to` value
- VM: Fixed operators with numbers not parsed
- VM: Fixed array operators can cause recursion which makes the VM crash
- VM: Fixed preprocessor parsing contents inbetween strings
- VM: Fixed any `#` would be consumed as preprocessor instructions
- VM: Fixed config operations navigating inherited classes.
Help output
.\sqfvm.exe --help
USAGE:
D:\Git\SQFvm\RELEASE-FOLDER\SQF-VM\x64\sqfvm.exe [-h] [--version] [--]
[--cli-file <PATH>] [-i <PATH>] ...
[--input-sqf <PATH>] ...
[--input-config <PATH>] ...
[--input-pbo <PATH>] ... [--sqf
<CODE>] ... [--config <CODE>] ...
[--pretty-print <PATH>] ... [-E
<PATH>] ... [-a] [-d <PORT>] [-m
<NUMBER>] [-c] [-l <PATH>] ... [-v
<PATH|VIRTUAL>] ... [--verbose]
[--parse-only] [--no-work-print]
[--no-execute-print]
[--no-load-execdir]
Where:
-h, --help
Displays usage information and exits.
--version
Displays version information and exits.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--cli-file <PATH>
Allows to provide a file from which to load arguments from. If passed,
all other arguments will be ignored! Each argument needs to be
separated by line-feed. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.
-i <PATH>, --input <PATH> (accepted multiple times)
Loads provided file from disk. File-Type is determined using default
file extensions (sqf, cpp, hpp, pbo). Supports absolut and relative
pathing using '.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-sqf <PATH> (accepted multiple times)
Loads provided SQF file from disk. Will be executed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-config <PATH> (accepted multiple times)
Loads provided config file from disk. Will be parsed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-pbo <PATH> (accepted multiple times)
Loads provided PBO file from disk. Will be parsed before files, added
using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--sqf <CODE> (accepted multiple times)
Loads provided sqf-code directly into the VM. Input is not getting
preprocessed!
--config <CODE> (accepted multiple times)
Loads provided config-code directly into the VM. Input is not getting
preprocessed!
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.!BE
AWARE! This is case-sensitive!
-E <PATH>, --preprocess-file <PATH> (accepted multiple times)
Runs the preprocessor on provided file and prints it to stdout.
Supports absolut and relative pathing using '.\path\to\file' or
'C:\path\to\file'.!BE AWARE! This is case-sensitive!
-a, --automated
Disables all possible prompts.
-d <PORT>, --debugger <PORT>
Causes the sqf-vm to start a network server that allows to attach a
single debugger to it.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-c, --check-classnames
Enables the config checking for eg. createVehicle.
-l <PATH>, --load <PATH> (accepted multiple times)
Adds provided path to the allowed locations list. Supports absolut and
relative pathing using '.\path\to\file' or 'C:\path\to\file'.
An allowed location, is a location SQF-VM will be allowed to load
files from.If you try to load a file from a given directory that is
not in the allowed list,the file loading WILL fail.Only the root path
of a given folder needs to be added, sub-folders are accessible
automatically.!BE AWARE! This is case-sensitive!
-v <PATH|VIRTUAL>, --virtual <PATH|VIRTUAL> (accepted multiple times)
Creates a mapping for a virtual and a physical path. Mapping is
separated by a '|', with the left side being the physical, and the
right argument the virtual path. Supports absolut and relative pathing
using '.\path\to\file' or 'C:\path\to\file'.
--verbose
Enables additional output.
--parse-only
Disables all code execution entirely and performs only the parsing
task.Note that this also will prevent the debugger to start.
--no-work-print
Disables the printing of all values which are on the work stack.
--no-execute-print
Disables the `Executing...` and two horizontal lines hint printing.
--no-load-execdir
Prevents automatically adding the workspace to the path of allowed
locations.
Emulates the ArmA-Series SQF environment.
Supported Commands
[
["n","parsingnamespace"],
["n","pi"],
["n","sidelogic"],
["n","nil"],
["n","east"],
["n","missionnamespace"],
["n","uinamespace"],
["n","profilenamespace"],
["n","resistance"],
["n","player"],
["n","productversion"],
["n","allunits"],
["n","diag_ticktime"],
["n","exit__"],
["n","cansuspend"],
["n","halt"],
["n","cmds__"],
["n","cmdsimplemented__"],
["n","allobjects__"],
["n","vm__"],
["n","respawn__"],
["n","true"],
["n","false"],
["n","confignull"],
["n","configfile"],
["n","blufor"],
["n","allmapmarkers"],
["n","west"],
["n","opfor"],
["n","independent"],
["n","civilian"],
["n","sideempty"],
["n","sideenemy"],
["n","sidefriendly"],
["n","sideunknown"],
["n","grpnull"],
["n","objnull"],
["u","abs","SCALAR"],
["u","sqrt","SCALAR"],
["u","preprocessfilelinenumbers","STRING"],
["u","deg","SCALAR"],
["u","acos","SCALAR"],
["u","switch","ANY"],
["u","selectmax","ARRAY"],
["u","log","SCALAR"],
["u","sin","SCALAR"],
["u","-","SCALAR"],
["u","tan","SCALAR"],
["u","rad","SCALAR"],
["u","sleep","SCALAR"],
["u","exp","SCALAR"],
["u","random","SCALAR"],
["u","systemchat","STRING"],
["u","+","SCALAR"],
["u","+","NaN"],
["u","+","ARRAY"],
["u","!","BOOL"],
["u","atg","SCALAR"],
["u","floor","SCALAR"],
["u","count","ARRAY"],
["u","count","STRING"],
["u","count","CONFIG"],
["u","cei","SCALAR"],
["u","asin","SCALAR"],
["u","if","BOOL"],
["u","selectmin","ARRAY"],
["u","ln","SCALAR"],
["u","nearestobjects","AR...
1.2.1-RC2
Changelog
- CLI: Removed `-f` alias of `--sqf-file PATH`
- CLI: Removed `-F` alias of `--config-file PATH`
- CLI: Removed `-n` alias of `--no-print`
- CLI: Removed `-N` alias of `--no-execute-print`
- CLI: Removed `-r` alias of `--sqf-code CODE`
- CLI: Removed `-R` alias of `--config-code CODE`
- CLI: Renamed `--no-prompt` to `--automated`
- CLI: Renamed `--no-print` to `--no-work-print`
- CLI: Renamed `--sqf-code CODE` to `--sqf CODE`
- CLI: Renamed `--config-code CODE` to `--config CODE`
- CLI: Renamed `--config-file PATH` to `--input-config PATH`
- CLI: Renamed `--sqf-file PATH` to `--input-sqf PATH`
- CLI: Renamed `--enable-classname-check` to `--check-classnames`
- CLI: Added `--input PATH` (`-i PATH`) to load supported files
- CLI: Added `--input-pbo PATH` to load supported pbo files
- CLI: Added `--parse-only` option, to disable the execution of SQF code.
- CLI: Fixed `--debugger <PORT>` always attempting to launch at port 1
- VM: Now using working directory instead of executable directory for relative paths
- VM: Line-Errors now start at 1 instead of 0
- VM: Path now is displayed the same way for parsing issues as it is for runtime issues
- VM: Improved config parsing performance
- VM: Implemented `<STRING> configClasses <CONFIG>`
- VM: Implemented `configProperties <ARRAY>`
- VM: Improved error messages on runtime_error (affected command: `callExtension`)
- VM: Library names no longer can contain `/` or `\`
- VM: Added `assert <BOOL>`
- VM: Added `halt`
- VM: Added `<ARRAY> # <SCALAR>`
- VM: Fixed `apply` operator crashing
- VM: Fixed `nil` being printed as `ni`
- VM: Fixed relative pathing on Linux
- VM: Fixed potential crash when cli-file was not found
- VM: Fixed potential crash on invalid filesystem usage
- VM: Fixed undetected PreProcessing instructions
- VM: Fixed filesystem `..` messup when using backslashes
- VM: Fixed filesystem nagivation issues with relative pathing
- VM: Fixed path is not getting displayed on operators
- VM: Fixed PreProcessing messing up linecount when `\r` is encountered
- VM: Fixed Circular Parenthood error in config
- VM: Fixed end of parsing before EOF was not erroring
- VM: Fixed missing `L` on error outputs (eg. `[ERR][5|C5]` instead of `[ERR][L5|C5]`)
- VM: Fixed `<object> in <object>`
- VM: Fixed `SCALAR toFixed SCALAR` missing tailing zeros
- VM: Fixed `for` var did not included `to` value
- VM: Fixed operators with numbers not parsed
- VM: Fixed array operators can cause recursion which makes the VM crash
- VM: Fixed preprocessor parsing contents inbetween strings
- VM: Fixed any `#` would be consumed as preprocessor instructions
- VM: Fixed config operations navigating inherited classes.
Help output
.\sqfvm.exe --help
USAGE:
D:\Git\SQFvm\RELEASE-FOLDER\SQF-VM\x64\sqfvm.exe [-h] [--version] [--]
[--cli-file <PATH>] [-i <PATH>] ...
[--input-sqf <PATH>] ...
[--input-config <PATH>] ...
[--input-pbo <PATH>] ... [--sqf
<CODE>] ... [--config <CODE>] ...
[--pretty-print <PATH>] ... [-E
<PATH>] ... [-a] [-d <PORT>] [-m
<NUMBER>] [-c] [-l <PATH>] ... [-v
<PATH|VIRTUAL>] ... [--verbose]
[--parse-only] [--no-work-print]
[--no-execute-print]
[--no-load-execdir]
Where:
-h, --help
Displays usage information and exits.
--version
Displays version information and exits.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--cli-file <PATH>
Allows to provide a file from which to load arguments from. If passed,
all other arguments will be ignored! Each argument needs to be
separated by line-feed. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.
-i <PATH>, --input <PATH> (accepted multiple times)
Loads provided file from disk. File-Type is determined using default
file extensions (sqf, cpp, hpp, pbo). Supports absolut and relative
pathing using '.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-sqf <PATH> (accepted multiple times)
Loads provided SQF file from disk. Will be executed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-config <PATH> (accepted multiple times)
Loads provided config file from disk. Will be parsed before files,
added using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--input-pbo <PATH> (accepted multiple times)
Loads provided PBO file from disk. Will be parsed before files, added
using '--input'. Supports absolut and relative pathing using
'.\path\to\file' or 'C:\path\to\file'.!BE AWARE! This is
case-sensitive!
--sqf <CODE> (accepted multiple times)
Loads provided sqf-code directly into the VM. Input is not getting
preprocessed!
--config <CODE> (accepted multiple times)
Loads provided config-code directly into the VM. Input is not getting
preprocessed!
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.!BE
AWARE! This is case-sensitive!
-E <PATH>, --preprocess-file <PATH> (accepted multiple times)
Runs the preprocessor on provided file and prints it to stdout.
Supports absolut and relative pathing using '.\path\to\file' or
'C:\path\to\file'.!BE AWARE! This is case-sensitive!
-a, --automated
Disables all possible prompts.
-d <PORT>, --debugger <PORT>
Causes the sqf-vm to start a network server that allows to attach a
single debugger to it.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-c, --check-classnames
Enables the config checking for eg. createVehicle.
-l <PATH>, --load <PATH> (accepted multiple times)
Adds provided path to the allowed locations list. Supports absolut and
relative pathing using '.\path\to\file' or 'C:\path\to\file'.
An allowed location, is a location SQF-VM will be allowed to load
files from.If you try to load a file from a given directory that is
not in the allowed list,the file loading WILL fail.Only the root path
of a given folder needs to be added, sub-folders are accessible
automatically.!BE AWARE! This is case-sensitive!
-v <PATH|VIRTUAL>, --virtual <PATH|VIRTUAL> (accepted multiple times)
Creates a mapping for a virtual and a physical path. Mapping is
separated by a '|', with the left side being the physical, and the
right argument the virtual path. Supports absolut and relative pathing
using '.\path\to\file' or 'C:\path\to\file'.
--verbose
Enables additional output.
--parse-only
Disables all code execution entirely and performs only the parsing
task.Note that this also will prevent the debugger to start.
--no-work-print
Disables the printing of all values which are on the work stack.
--no-execute-print
Disables the `Executing...` and two horizontal lines hint printing.
--no-load-execdir
Prevents automatically adding the workspace to the path of allowed
locations.
Emulates the ArmA-Series SQF environment.
Supported Commands
[
["n","parsingnamespace"],
["n","pi"],
["n","sidelogic"],
["n","nil"],
["n","east"],
["n","missionnamespace"],
["n","uinamespace"],
["n","profilenamespace"],
["n","resistance"],
["n","player"],
["n","productversion"],
["n","allunits"],
["n","diag_ticktime"],
["n","exit__"],
["n","cansuspend"],
["n","halt"],
["n","cmds__"],
["n","cmdsimplemented__"],
["n","allobjects__"],
["n","vm__"],
["n","respawn__"],
["n","true"],
["n","false"],
["n","confignull"],
["n","configfile"],
["n","blufor"],
["n","allmapmarkers"],
["n","west"],
["n","opfor"],
["n","independent"],
["n","civilian"],
["n","sideempty"],
["n","sideenemy"],
["n","sidefriendly"],
["n","sideunknown"],
["n","grpnull"],
["n","objnull"],
["u","abs","SCALAR"],
["u","sqrt","SCALAR"],
["u","preprocessfilelinenumbers","STRING"],
["u","deg","SCALAR"],
["u","acos","SCALAR"],
["u","switch","ANY"],
["u","selectmax","ARRAY"],
["u","log","SCALAR"],
["u","sin","SCALAR"],
["u","-","SCALAR"],
["u","tan","SCALAR"],
["u","rad","SCALAR"],
["u","sleep","SCALAR"],
["u","exp","SCALAR"],
["u","random","SCALAR"],
["u","systemchat","STRING"],
["u","+","SCALAR"],
["u","+","NaN"],
["u","+","ARRAY"],
["u","!","BOOL"],
["u","atg","SCALAR"],
["u","floor","SCALAR"],
["u","count","ARRAY"],
["u","count","STRING"],
["u","count","CONFIG"],
["u","cei","SCALAR"],
["u","asin","SCALAR"],
["u","if","BOOL"],
["u","selectmin","ARRAY"],
["u","ln","SCALAR"],
["u","nearestobjects","AR...
1.2.0-RC1
1.1.0-RC1
Changelog
- 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
Help output
.\sqfvm.exe --help
USAGE:
D:\Git\SQFvm\vm\RelWithDebInfo\sqfvm.exe [--pretty-print <PATH>] ...
[-c] [-N] [-n] [-p <NUMBER>] [-m
<NUMBER>] [-s] [-a] [-R <CODE>] ...
[-r <CODE>] ... [-F <PATH>] ...
[-f <PATH>] ... [--] [--version]
[-h]
Where:
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.
-c, --enable-classname-check
Enables the config checking for eg. createVehicle.
-N, --no-execute-print
Prevents the `Execute` and two horizontal lines to be printed.
-n, --no-print
Prevents the value stack to be printed out at the very end.
-p <NUMBER>, --server-port <NUMBER>
Sets the port of the server. Defaults to 9090.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-s, --start-server
Causes the sqf-vm to start a network server allowing for automated
control.
-a, --no-prompt
Disables the prompt which expects you to type in sqf-code.
-R <CODE>, --config-code <CODE> (accepted multiple times)
Loads provided config-code directly into the sqf-vm. (executed after
files)
-r <CODE>, --sqf-code <CODE> (accepted multiple times)
Loads provided sqf-code directly into the sqf-vm. (executed after
files)
-F <PATH>, --config-file <PATH> (accepted multiple times)
Loads provided config-file from the hdd into the sqf-vm.
-f <PATH>, --sqf-file <PATH> (accepted multiple times)
Loads provided sqf-file from the hdd into the sqf-vm.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
Emulates the ArmA-Series SQF environment.
Supported Commands
[
["n","parsingnamespace"],
["n","pi"],
["n","nil"],
["n","east"],
["n","missionnamespace"],
["n","uinamespace"],
["n","profilenamespace"],
["n","productversion"],
["n","allunits"],
["n","diag_ticktime"],
["n","cansuspend"],
["n","cmdsimplemented__"],
["n","cmds__"],
["n","allobjects__"],
["n","exit__"],
["n","vm__"],
["n","true"],
["n","false"],
["n","confignull"],
["n","configfile"],
["n","allmapmarkers"],
["n","blufor"],
["n","west"],
["n","opfor"],
["n","resistance"],
["n","independent"],
["n","civilian"],
["n","sideempty"],
["n","sideenemy"],
["n","grpnull"],
["n","sidefriendly"],
["n","sidelogic"],
["n","sideunknown"],
["n","objnull"],
["u","abs","SCALAR"],
["u","round","SCALAR"],
["u","sqrt","SCALAR"],
["u","deg","SCALAR"],
["u","acos","SCALAR"],
["u","selectmax","ARRAY"],
["u","log","SCALAR"],
["u","sin","SCALAR"],
["u","toupper","STRING"],
["u","tan","SCALAR"],
["u","exp","SCALAR"],
["u","rad","SCALAR"],
["u","random","SCALAR"],
["u","hint","STRING"],
["u","hint","TEXT"],
["u","-","SCALAR"],
["u","systemchat","STRING"],
["u","+","SCALAR"],
["u","+","NaN"],
["u","+","ARRAY"],
["u","!","BOOL"],
["u","floor","SCALAR"],
["u","count","ARRAY"],
["u","count","STRING"],
["u","count","CONFIG"],
["u","cei","SCALAR"],
["u","asin","SCALAR"],
["u","selectmin","ARRAY"],
["u","ln","SCALAR"],
["u","atan","SCALAR"],
["u","allvariables","NAMESPACE"],
["u","allvariables","OBJECT"],
["u","allvariables","GROUP"],
["u","atg","SCALAR"],
["u","isnil","STRING"],
["u","isnil","CODE"],
["u","units","GROUP"],
["u","units","OBJECT"],
["u","cos","SCALAR"],
["u","private","STRING"],
["u","private","ARRAY"],
["u","vectormagnitude","ARRAY"],
["u","format","ARRAY"],
["u","scriptdone","SCRIPT"],
["u","vectormagnitudesqr","ARRAY"],
["u","vectornormalized","ARRAY"],
["u","tofixed","SCALAR"],
["u","call","CODE"],
["u","with","NAMESPACE"],
["u","default","CODE"],
["u","comment","STRING"],
["u","side","GROUP"],
["u","side","OBJECT"],
["u","compile","STRING"],
["u","while","CODE"],
["u","typename","ANY"],
["u","for","STRING"],
["u","str","ANY"],
["u","if","BOOL"],
["u","selectrandom","ARRAY"],
["u","reverse","ARRAY"],
["u","tolower","STRING"],
["u","case","ANY"],
["u","switch","ANY"],
["u","params","ARRAY"],
["u","sleep","SCALAR"],
["u","diag_log","ANY"],
["u","tree__","STRING"],
["u","help__","STRING"],
["u","typeof","OBJECT"],
["u","markershape","STRING"],
["u","configparse__","STRING"],
["u","markertext","STRING"],
["u","isnumber","CONFIG"],
["u","prettyprintsqf__","STRING"],
["u","toarray","STRING"],
["u","tostring","ARRAY"],
["u","configname","CONFIG"],
["u","confighierarchy","CONFIG"],
["u","inheritsfrom","CONFIG"],
["u","istext","CONFIG"],
["u","isclass","CONFIG"],
["u","isarray","CONFIG"],
["u","getnumber","CONFIG"],
["u","gettext","CONFIG"],
["u","getarray","CONFIG"],
["u","isnull","CONFIG"],
["u","isnull","GROUP"],
["u","isnull","OBJECT"],
["u","creategroup","SIDE"],
["u","groupid","GROUP"],
["u","deletegroup","GROUP"],
["u","createvehicle","ARRAY"],
["u","deletevehicle","OBJECT"],
["u","position","OBJECT"],
["u","getpos","OBJECT"],
["u","velocity","OBJECT"],
["u","nearestobjects","ARRAY"],
["u","getmarkertype","STRING"],
["u","markertype","STRING"],
["u","getmarkersize","STRING"],
["u","markersize","STRING"],
["u","getmarkercolor","STRING"],
["u","markercolor","STRING"],
["u","getmarke...
1.0.0-RC1
Help output:
USAGE:
D:\Git\SQF-VM\Release\Windows\x64\sqfvm-cpp.exe [--pretty-print <PATH>]
... [-c] [-N] [-n] [-p <NUMBER>]
[-m <NUMBER>] [-s] [-a] [-R <CODE>]
... [-r <CODE>] ... [-F <PATH>]
... [-f <PATH>] ... [--]
[--version] [-h]
Where:
--pretty-print <PATH> (accepted multiple times)
Loads provided file from disk and pretty-prints it onto console.
-c, --disable-classname-check
Disables the config checking for eg. createVehicle.
-N, --no-execute-print
Prevents the `Execute` and two horizontal lines to be printed.
-n, --no-print
Prevents the value stack to be printed out at the very end.
-p <NUMBER>, --server-port <NUMBER>
Sets the port of the server. Defaults to 9090.
-m <NUMBER>, --max-instructions <NUMBER>
Sets the maximum ammount of instructions to execute before a hard exit
may occur. Setting this to 0 will disable the limit.
-s, --start-server
Causes the sqf-vm to start a network server allowing for automated
control.
-a, --no-prompt
Disables the prompt which expects you to type in sqf-code.
-R <CODE>, --config-code <CODE> (accepted multiple times)
Loads provided config-code directly into the sqf-vm. (executed after
files)
-r <CODE>, --sqf-code <CODE> (accepted multiple times)
Loads provided sqf-code directly into the sqf-vm. (executed after
files)
-F <PATH>, --config-file <PATH> (accepted multiple times)
Loads provided config-file from the hdd into the sqf-vm.
-f <PATH>, --sqf-file <PATH> (accepted multiple times)
Loads provided sqf-file from the hdd into the sqf-vm.
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
Emulates the ArmA-Series SQF environment.
Supported commands:
[
["n", "parsingnamespace"],
["n", "pi"],
["n", "nil"],
["n", "east"],
["n", "missionnamespace"],
["n", "cmds__"],
["n", "uinamespace"],
["n", "profilenamespace"],
["n", "productversion"],
["n", "diag_ticktime"],
["n", "allobjects__"],
["n", "true"],
["n", "false"],
["n", "confignull"],
["n", "configfile"],
["n", "blufor"],
["n", "west"],
["n", "opfor"],
["n", "resistance"],
["n", "independent"],
["n", "civilian"],
["n", "sideempty"],
["n", "sideenemy"],
["n", "grpnull"],
["n", "sidefriendly"],
["n", "sidelogic"],
["n", "sideunknown"],
["n", "objnull"],
["u", "abs", "SCALAR"],
["u", "round", "SCALAR"],
["u", "sqrt", "SCALAR"],
["u", "deg", "SCALAR"],
["u", "acos", "SCALAR"],
["u", "selectmax", "ARRAY"],
["u", "log", "SCALAR"],
["u", "sin", "SCALAR"],
["u", "toupper", "STRING"],
["u", "tan", "SCALAR"],
["u", "exp", "SCALAR"],
["u", "rad", "SCALAR"],
["u", "random", "SCALAR"],
["u", "hint", "STRING"],
["u", "hint", "TEXT"],
["u", "-", "SCALAR"],
["u", "systemchat", "STRING"],
["u", "+", "SCALAR"],
["u", "+", "NaN"],
["u", "+", "ARRAY"],
["u", "!", "BOOL"],
["u", "floor", "SCALAR"],
["u", "count", "ARRAY"],
["u", "count", "STRING"],
["u", "count", "CONFIG"],
["u", "cei", "SCALAR"],
["u", "asin", "SCALAR"],
["u", "selectmin", "ARRAY"],
["u", "ln", "SCALAR"],
["u", "atan", "SCALAR"],
["u", "allvariables", "NAMESPACE"],
["u", "allvariables", "OBJECT"],
["u", "allvariables", "GROUP"],
["u", "atg", "SCALAR"],
["u", "isnil", "STRING"],
["u", "isnil", "CODE"],
["u", "units", "GROUP"],
["u", "units", "OBJECT"],
["u", "cos", "SCALAR"],
["u", "private", "STRING"],
["u", "private", "ARRAY"],
["u", "vectormagnitude", "ARRAY"],
["u", "format", "ARRAY"],
["u", "scriptdone", "SCRIPT"],
["u", "vectormagnitudesqr", "ARRAY"],
["u", "vectornormalized", "ARRAY"],
["u", "call", "CODE"],
["u", "with", "NAMESPACE"],
["u", "default", "CODE"],
["u", "comment", "STRING"],
["u", "compile", "STRING"],
["u", "while", "CODE"],
["u", "typename", "ANY"],
["u", "str", "ANY"],
["u", "for", "STRING"],
["u", "if", "BOOL"],
["u", "selectrandom", "ARRAY"],
["u", "reverse", "ARRAY"],
["u", "tolower", "STRING"],
["u", "case", "ANY"],
["u", "switch", "ANY"],
["u", "params", "ARRAY"],
["u", "diag_log", "ANY"],
["u", "tree__", "STRING"],
["u", "typeof", "OBJECT"],
["u", "help__", "STRING"],
["u", "configparse__", "STRING"],
["u", "toarray", "STRING"],
["u", "tostring", "ARRAY"],
["u", "configname", "CONFIG"],
["u", "confighierarchy", "CONFIG"],
["u", "inheritsfrom", "CONFIG"],
["u", "isnumber", "CONFIG"],
["u", "istext", "CONFIG"],
["u", "isclass", "CONFIG"],
["u", "isarray", "CONFIG"],
["u", "getnumber", "CONFIG"],
["u", "gettext", "CONFIG"],
["u", "getarray", "CONFIG"],
["u", "creategroup", "SIDE"],
["u", "groupid", "GROUP"],
["u", "deletegroup", "GROUP"],
["u", "createvehicle", "ARRAY"],
["u", "deletevehicle", "OBJECT"],
["u", "position", "OBJECT"],
["u", "getpos", "OBJECT"],
["u", "velocity", "OBJECT"],
["b", "SCALAR", "min", "SCALAR"],
["b", "SCALAR", "atan2", "SCALAR"],
["b", "OBJECT", "domove", "ARRAY"],
["b", "ARRAY", "domove", "ARRAY"],
["b", "SCALAR", "^", "SCALAR"],
["b", "CODE", "foreach", "ARRAY"],
["b", "ARRAY", "vectordiff", "ARRAY"],
["b", "ARRAY", "vectoradd", "ARRAY"],
["b", "SCALAR", "max", "SCALAR"],
["b", "ANY", "!=", "ANY"],
["b", "SIDE", "!=", "SIDE"],
["b", "STRING", "!=", "STRING"],
["b", "OBJECT", "!=", "OBJECT"],
["b", "GROUP", "!=", "GROUP"],
["b", "TEXT", "!=", "TEXT"],
["b", "CONFIG", "!=", "CONFIG"],
["b", "DISPLAY", "!=", "DISPLAY"],
["b", "CONTRO", "!=", "CONTRO"],
["b", "LOCATION", "!=", "LOCATION"],
["b", "ARRAY", "set", "ARRAY"],
["b", "SCALAR", "mod", "SCALAR"],
["b", "SCALAR", "-", "SCALAR"],
["b", "ARRAY", "-", "ARRAY"],
["b", "SCALAR", "%", "SCALAR"],
["b", "ARRAY", "pushback", "ANY"],
["b", "SCALAR", "+", "SCALAR"],
["b", "ARRAY", "+", "ARRAY"],
["b", "STRING", "+", "STRING"],
["b", "SCALAR", "*", "SCALAR"],
["b", "SCALAR", "/", "SCALAR"],
["b", "CONFIG", "/", "STRING"],
["b", "ARRAY", "vectorcos", "ARRAY"],
["b", "SCALAR", ">", "SCALAR"],
["b", "ARRAY", "append", "ARRAY"],
["b", "ARRAY", "resize", "SCALAR"],
["b", "ARRAY", "vectorcrossproduct", "ARRAY"],
["b", "IF", "exitwith", "CODE"],
["b", "ANY", "call", "CODE"],
["b", "ARRAY", "vectordistance", "ARRAY"],
["b", "BOOL", "&&", "BOOL"],
["b", "BOOL", "&&", "CODE"],
["b", "SWITCH", ":", "CODE"],
["b", "ARRAY", "select", "SCALAR"],
["b", "ARRAY", "select", "BOOL"],
["b", "ARRAY", "select", "ARRAY"],
["b", "ARRAY", "select", "CODE"],
["b", "STRING", "select", "ARRAY"],
["b", "CONFIG", "select", "SCALAR"],
["b", "ARRAY", "vectordistancesqr", "ARRAY"],
["b", "ANY", "spawn", "CODE"],
["b", "ARRAY", "vectordotproduct", "ARRAY"],
["b", "SCALAR", "<=", "SCALAR"],
["b", "ARRAY", "vectormultiply", "SCALAR"],
["b", "SCALAR", ">=", "SCALAR"],
["b", "WITH", "do", "CODE"],
["b", "WHILE", "do", "CODE"],
["b", "FOR", "do", "CODE"],
["b", "SWITCH", "do", "CODE"],
["b", "NAMESPACE", "getvariable", "STRING"],
["b", "NAMESPACE", "getvariable", "ARRAY"],
["b", "OBJECT", "getvariable", "STRING"],
["b", "OBJECT", "getvariable", "ARRAY"],
["b", "GROUP", "getvariable", "STRING"],
["b", "GROUP", "getvariable", "ARRAY"],
["b", "SCALAR", "==", "SCALAR"],
["b", "SIDE", "==", "SIDE"],
["b", "STRING", "==", "STRING"],
["b", "OBJECT", "==", "OBJECT"],
["b", "GROUP", "==", "GROUP"],
["b", "TEXT", "==", "TEXT"],
["b", "CONFIG", "==", "CONFIG"],
["b", "DISPLAY", "==", "DISPLAY"],
["b", "CONTRO", "==", "CONTRO"],
["b", "LOCATION", "==", "LOCATION"],
["b", "FOR", "step", "SCALAR"],
["b", "NAMESPACE", "setvariable", "ARRAY"],
["b", "OBJECT", "setvariable", "ARRAY"],
["b", "GROUP", "setvariable", "ARRAY"],
["b", "OBJECT", "setvelocity", "ARRAY"],
["b", "ARRAY", "joinstring", "STRING"],
["b", "CODE", "count", "ARRAY"],
["b", "STRING", "callextension", "STRING"],
["b", "STRING", "callextension", "ARRAY"],
["b", "IF", "then", "ARRAY"],
["b", "IF", "then", "CODE"],
["b", "CODE", "else", "CODE"],
["b", "FOR", "from", "SCALAR"],
["b", "FOR", "to", "SCALAR"],
["b", "SCALAR", "<", "SCALAR"],
["b", "ARRAY", "apply", "CODE"],
["b", "ARRAY", "deleteat", "SCALAR"],
["b", "ARRAY", "arrayintersect", "ARRAY"],
["b", "ARRAY", "find", "ANY"],
["b", "STRING", "find", "STRING"],
["b", "ARRAY", "params", "ARRAY"],
["b", "CONFIG", "merge__", "CONFIG"],
["b", "...
Alpha 0.1.4
Changelog
SCRIPT:t:0:(null)
CONFIG:t:0:(null)
configFile:n:4:nil
selectRandom:u:4:selectRandom <ARRAY>
getText:u:4:getText <CONFIG>
tolower:u:4:tolower <STRING>
vectorNormalized:u:4:vectorNormalized <VECTOR3D>
toupper:u:4:toupper <STRING>
isArray:u:4:isArray <CONFIG>
isText:u:4:isText <CONFIG>
vectorMagnitude:u:4:vectorMagnitude <VECTOR3D>
isNumber:u:4:isNumber <CONFIG>
getNumber:u:4:getNumber <CONFIG>
inheritsFrom:u:4:inheritsFrom <CONFIG>
isClass:u:4:isClass <CONFIG>
getArray:u:4:getArray <CONFIG>
reverse:u:4:reverse <ARRAY>
scriptDone:u:4:scriptDone <SCRIPT>
vectorMagnitudeSqr:u:4:vectorMagnitudeSqr <VECTOR3D>
>>:b:4:<CONFIG> >> <STRING>
vectorMultiply:b:4:<VECTOR3D> ectorMultiply <SCALAR>
vectorDistance:b:4:<VECTOR3D> vectorDistance <VECTOR3D>
vectorDistanceSqr:b:4:<VECTOR3D> vectorDistanceSqr <VECTOR3D>
vectorDiff:b:4:<VECTOR3D> vectorDiff <VECTOR3D>
spawn:b:4:<ANY> spawn <CODE>
resize:b:4:<ARRAY> resize <SCALAR>
vectorDotProduct:b:4:<VECTOR3D> vectorDotProduct <VECTOR3D>
vectorAdd:b:4:<VECTOR3D> vectorAdd <VECTOR3D>
vectorCos:b:4:<VECTOR3D> vectorCos <VECTOR3D>
createUnit:b:4:<GROUP> createUnit <ARRAY>
deleteAt:b:4:<ARRAY> deleteAt <SCALAR>
append:b:4:<ARRAY> append <ARRAY>
find:b:4:<ARRAY> find <ANY>#<STRING> find <STRING>
exitWith:b:4:<IF> exitWith <CODE>
/:b:7:<SCALAR> / <SCALAR> | <CONFIG> / <STRING>
arrayIntersect:b:4:<ARRAY> arrayIntersect <ARRAY>
vectorCrossProduct:b:4:<VECTOR3D> vectorCrossProduct <VECTOR3D>
mergefrom__:b:4:<CONFIG> mergefrom__ <CONFIG>
parseconfig__:u:4:parseconfig__ <STRING>
Commit-Log
Fixed `while` not creating its own scope; implemented `exitWith`
fixed warnings
fixed some warnings
fix in wsm_destroy_bucket (not affects sqf-vm in any means)
removed unused variable
removed unused variable
fixed negative config numbers not getting negativly parsed and some warnings
fixed warnings
added hint to get- & setvariable
now outputting true on no-default default switch
fixed hang on invalid parsing of configs
now outputting objNull on null objects stringification
double non-command usage now should always underline the invalid command and not the one before
code cleanup
numbers now also accept large E
removed test call
updated script
fixed various bugs
fixed cloning does not updated children_top
config_find_inheriting_node will now perform a check if a inheriting node is set.
small fixes on config, renamed PCONFIGNODE to PCONFIG, improved merging
fixed parent gets null on mergefrom__
fixed mergeinto__ command having swaped parameters
now outputting configNull on configNull
fixed NPE on refcount update for config types
fixed wrong command pathing for `>>`
Tokenizer now recognizes double single-quota escape
now escaping double single-quotas too
Merge pull request #13 from X39/config-parser
Merge branch 'master' into config-parser
upped toolkit version
fixed file loading
Added warning on select index on array length
fixed set command
stuff
fixed linux not returning swprintf buffer size issue
fix for group names not getting printed due to wchar char issue
added tolower & toupper
fixed forach not returning last result
fixed wide char vs char issue
added config commands
fixed memory leak in params command
fixed quotation parsing
Fixed string parsing issue when parsing empty strings
Added description to new sqf-vm only commands
added `mergefrom__` command
Fixed errors that caused memory leaks in config parser
removed duplicate semicolon
last '/' now is ommited correctly
added stringify for config type
fixes to parsing of array value fields
Added destroy command for cleanup to main
groupmap now only can exist once over all VMs (made static)
Added configparser
Merge branch 'master'
Fixed invalid string parsing on double quote usage
replaced last occurances of %S with %ls
initial files
config start
more fix for help__
fixed wchar help__
fixed linux
Probably fixed wchar issues on linux
added test macro to test buffer usage
added explicit null at the end of buffer
back to lower for the last char*
fixed only first character being printed
Merge branch 'master' of https://github.com/X39/sqf-vm.git
pushh
fix for gnuc
ups
fix for gcc windows cygwin
Revert "fixed warning"
fixed warning
warning fix
added missing #iinclude math.h
added wctype.h include
casing
changed casing to lower
updated discord bot
fixed receiving group is not working
fixed createUnit usage missing character
fixed problems after merge
fixed linker error (vs only)
merge
Merge pull request #11 from Krzmbrzl/master
added commands: vectorDotProduct, vectorCos, vectorMagnitude, vectorMagnitudeSqr, vectorMultiply, vectorDistance, vectorDistanceSqr, vectorNormalized
started working on array-commands
started implementing vector commands; vectorAdd, vectorDiff, vectorCrossProduct; added unitity functions for calculating with scalars
Merge pull request #1 from X39/master
added wchar support
Added 0 check for optional stack
Added syntax error on double non-command usage
increased line buffer size
fix for windows
Fixed array parsing when using commands with left arg being code or array
increased stacksize
asd
fixed selectRandom distribution
fixed deleteAt
fixed arrayIntersect
removed unused variable
fixed macro
fixed warnings
fixed invalid argument order
stuff
fixed memoryleak
fixed memory leak in help__ unary
fixed naming, location & memory leaks introduced via PR
Fixes for latest PR
Merge pull request #10 from Krzmbrzl/master
Merge branch 'master' into master
altered casing of CMD_XXXX to lowercase
stuff
started moving over to VALUE_XXXX macros
base_ptr --> base_voidptr
removed nonsense commatas
replaced accidential `;` with `,`
Added missing parentheses
added VALUE_XXXX relations for every type
tweaked code style
configured .gitignore to ignore hidden files (prefixed by a dot)
Added function description
corrected memory leaks; fixed seed-bug within the selectRandom command; adapted formatting; added command meta-info
removed eclipse files
Added commands: selectRandom; resize; deleteAt; append; reverse; find; arrayIntersect
fixed error with `set` when resizing array
fixed `set` command just pushing instead of changing
upped version number
Fixed memory leak caused by missing free of scripts in sqfvm struct
Added scriptDone and added _thisScript to spawn command (also fixed spawn not returning script handle)
added spawn
fixed "comments" in strings "work" and break tokenizer
Alpha 0.1.3
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