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","ARRAY"],
["u","atan","SCALAR"],
["u","cos","SCALAR"],
["u","assert","BOOL"],
["u","deletemarkerlocal","STRING"],
["u","round","SCALAR"],
["u","private","STRING"],
["u","private","ARRAY"],
["u","vectormagnitude","ARRAY"],
["u","velocity","OBJECT"],
["u","param","ARRAY"],
["u","vectormagnitudesqr","ARRAY"],
["u","vectornormalized","ARRAY"],
["u","default","CODE"],
["u","side","GROUP"],
["u","side","OBJECT"],
["u","comment","STRING"],
["u","tofixed","SCALAR"],
["u","allvariables","NAMESPACE"],
["u","allvariables","OBJECT"],
["u","allvariables","GROUP"],
["u","call","CODE"],
["u","with","NAMESPACE"],
["u","compile","STRING"],
["u","typename","ANY"],
["u","while","CODE"],
["u","gettext","CONFIG"],
["u","prettyprintsqf__","STRING"],
["u","str","ANY"],
["u","for","STRING"],
["u","selectrandom","ARRAY"],
["u","reverse","ARRAY"],
["u","isnil","STRING"],
["u","isnil","CODE"],
["u","toupper","STRING"],
["u","hint","STRING"],
["u","hint","TEXT"],
["u","tolower","STRING"],
["u","scriptname","STRING"],
["u","case","ANY"],
["u","format","ARRAY"],
["u","scriptdone","SCRIPT"],
["u","tree__","STRING"],
["u","params","ARRAY"],
["u","createmarker","ARRAY"],
["u","preprocessfile","STRING"],
["u","preprocessfile","STRING"],
["u","diag_log","ANY"],
["u","deletemarker","STRING"],
["u","configparse__","STRING"],
["u","damage","OBJECT"],
["u","help__","STRING"],
["u","preprocess__","STRING"],
["u","toarray","STRING"],
["u","commander","OBJECT"],
["u","tostring","ARRAY"],
["u","configname","CONFIG"],
["u","confighierarchy","CONFIG"],
["u","inheritsfrom","CONFIG"],
["u","isnumber","CONFIG"],
["u","istext","CONFIG"],
["u","isclass","CONFIG"],
["u","vehicle","OBJECT"],
["u","markerdir","STRING"],
["u","isarray","CONFIG"],
["u","getnumber","CONFIG"],
["u","getarray","CONFIG"],
["u","isnull","CONFIG"],
["u","isnull","GROUP"],
["u","isnull","OBJECT"],
["u","configproperties","ARRAY"],
["u","creategroup","SIDE"],
["u","groupid","GROUP"],
["u","units","GROUP"],
["u","units","OBJECT"],
["u","deletegroup","GROUP"],
["u","typeof","OBJECT"],
["u","createvehicle","ARRAY"],
["u","alive","OBJECT"],
["u","deletevehicle","OBJECT"],
["u","position","OBJECT"],
["u","getpos","OBJECT"],
["u","getdammage","OBJECT"],
["u","crew","OBJECT"],
["u","objectparent","OBJECT"],
["u","driver","OBJECT"],
["u","gunner","OBJECT"],
["u","getmarkertype","STRING"],
["u","markertype","STRING"],
["u","getmarkersize","STRING"],
["u","markersize","STRING"],
["u","getmarkercolor","STRING"],
["u","markercolor","STRING"],
["u","getmarkerpos","STRING"],
["u","markerpos","STRING"],
["u","markerbrush","STRING"],
["u","markertext","STRING"],
["u","markershape","STRING"],
["u","markeralpha","STRING"],
["u","createmarkerlocal","ARRAY"],
["b","SCALAR","atan2","SCALAR"],
["b","SCALAR","min","SCALAR"],
["b","OBJECT","domove","ARRAY"],
["b","ARRAY","domove","ARRAY"],
["b","ARRAY","vectorcrossproduct","ARRAY"],
["b","SCALAR","^","SCALAR"],
["b","CODE","foreach","ARRAY"],
["b","ARRAY","vectordiff","ARRAY"],
["b","SCALAR","max","SCALAR"],
["b","ARRAY","vectoradd","ARRAY"],
["b","ARRAY","set","ARRAY"],
["b","SCALAR","mod","SCALAR"],
["b","ANY","spawn","CODE"],
["b","SCALAR","-","SCALAR"],
["b","ARRAY","-","ARRAY"],
["b","SCALAR","%","SCALAR"],
["b","SCALAR","+","SCALAR"],
["b","ARRAY","+","ARRAY"],
["b","STRING","+","STRING"],
["b","ARRAY","findif","CODE"],
["b","SCALAR","*","SCALAR"],
["b","ANY","in","ARRAY"],
["b","OBJECT","in","OBJECT"],
["b","SCALAR","tofixed","SCALAR"],
["b","SCALAR","/","SCALAR"],
["b","CONFIG","/","STRING"],
["b","BOOL","||","BOOL"],
["b","BOOL","||","CODE"],
["b","ARRAY","vectorcos","ARRAY"],
["b","IF","exitwith","CODE"],
["b","ANY","call","CODE"],
["b","ARRAY","vectordistance","ARRAY"],
["b","CONFIG",">>","STRING"],
["b","SWITCH",":","CODE"],
["b","ARRAY","vectordistancesqr","ARRAY"],
["b","ARRAY","vectordotproduct","ARRAY"],
["b","SCALAR","<=","SCALAR"],
["b","ARRAY","#","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","CONTROL","==","CONTROL"],
["b","LOCATION","==","LOCATION"],
["b","NAMESPACE","setvariable","ARRAY"],
["b","OBJECT","setvariable","ARRAY"],
["b","GROUP","setvariable","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","STRING","setmarkerdir","SCALAR"],
["b","CODE","else","CODE"],
["b","CONFIG","merge__","CONFIG"],
["b","ARRAY","pushbackunique","ANY"],
["b","FOR","from","SCALAR"],
["b","BOOL","or","BOOL"],
["b","BOOL","or","CODE"],
["b","FOR","to","SCALAR"],
["b","FOR","step","SCALAR"],
["b","STRING","setmarkercolorlocal","STRING"],
["b","BOOL","&&","BOOL"],
["b","BOOL","&&","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","SCALAR",">","SCALAR"],
["b","ARRAY","append","ARRAY"],
["b","ARRAY","resize","SCALAR"],
["b","ARRAY","pushback","ANY"],
["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","ANY","param","ARRAY"],
["b","STRING","setmarkershape","STRING"],
["b","CODE","except__","CODE"],
["b","BOOL","and","BOOL"],
["b","BOOL","and","CODE"],
["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","CONTROL","!=","CONTROL"],
["b","LOCATION","!=","LOCATION"],
["b","ANY","isequalto","ANY"],
["b","ANY","isequaltype","ANY"],
["b","STRING","configclasses","CONFIG"],
["b","STRING","createvehicle","ARRAY"],
["b","STRING","setmarkeralpha","SCALAR"],
["b","ANY","createvehiclelocal","ANY"],
["b","STRING","setmarkeralphalocal","SCALAR"],
["b","OBJECT","setpos","ARRAY"],
["b","OBJECT","setvelocity","ARRAY"],
["b","GROUP","createunit","ARRAY"],
["b","STRING","createunit","ARRAY"],
["b","ARRAY","distance","ARRAY"],
["b","OBJECT","distance","ARRAY"],
["b","ARRAY","distance","OBJECT"],
["b","OBJECT","distance","OBJECT"],
["b","OBJECT","iskindof","STRING"],
["b","STRING","iskindof","STRING"],
["b","STRING","iskindof","ARRAY"],
["b","OBJECT","setdamage","SCALAR"],
["b","STRING","setmarkertext","STRING"],
["b","STRING","setmarkershapelocal","STRING"],
["b","STRING","setmarkerbrush","STRING"],
["b","STRING","setmarkerbrushlocal","STRING"],
["b","STRING","setmarkerpos","ARRAY"],
["b","STRING","setmarkerposlocal","ARRAY"],
["b","STRING","setmarkertype","STRING"],
["b","STRING","setmarkertypelocal","STRING"],
["b","STRING","setmarkertextlocal","STRING"],
["b","STRING","setmarkerdirlocal","SCALAR"],
["b","STRING","setmarkercolor","STRING"],
["b","STRING","setmarkersize","ARRAY"],
["b","STRING","setmarkersizelocal","ARRAY"]
]