Skip to content

@X39 X39 released this Oct 16, 2018 · 504 commits to master since this release

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","getmarkerpos","STRING"],
    ["u","markerpos","STRING"],
    ["u","markerbrush","STRING"],
    ["u","markerdir","STRING"],
    ["u","markeralpha","STRING"],
    ["u","createmarker","ARRAY"],
    ["u","createmarkerlocal","ARRAY"],
    ["u","deletemarker","STRING"],
    ["u","deletemarkerlocal","STRING"],
    ["b","SCALAR","min","SCALAR"],
    ["b","SCALAR","atan2","SCALAR"],
    ["b","SCALAR","^","SCALAR"],
    ["b","CODE","foreach","ARRAY"],
    ["b","ARRAY","vectoradd","ARRAY"],
    ["b","ARRAY","vectordiff","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","CONTROL","!=","CONTROL"],
    ["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","ARRAY","findif","CODE"],
    ["b","SCALAR","*","SCALAR"],
    ["b","SCALAR","/","SCALAR"],
    ["b","CONFIG","/","STRING"],
    ["b","ARRAY","vectorcos","ARRAY"],
    ["b","SCALAR",">","SCALAR"],
    ["b","ARRAY","append","ARRAY"],
    ["b","ARRAY","vectorcrossproduct","ARRAY"],
    ["b","ARRAY","resize","SCALAR"],
    ["b","IF","exitwith","CODE"],
    ["b","ANY","call","CODE"],
    ["b","ARRAY","vectordistance","ARRAY"],
    ["b","BOOL","&&","BOOL"],
    ["b","BOOL","&&","CODE"],
    ["b","ARRAY","vectordistancesqr","ARRAY"],
    ["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","ANY","spawn","CODE"],
    ["b","ARRAY","vectordotproduct","ARRAY"],
    ["b","SCALAR","<=","SCALAR"],
    ["b","ARRAY","vectormultiply","SCALAR"],
    ["b","SCALAR","tofixed","SCALAR"],
    ["b","WITH","do","CODE"],
    ["b","WHILE","do","CODE"],
    ["b","FOR","do","CODE"],
    ["b","SWITCH","do","CODE"],
    ["b","SCALAR",">=","SCALAR"],
    ["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","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","ARRAY","pushbackunique","ANY"],
    ["b","FOR","from","SCALAR"],
    ["b","FOR","to","SCALAR"],
    ["b","STRING","setmarkercolor","STRING"],
    ["b","SCALAR","<","SCALAR"],
    ["b","ARRAY","apply","CODE"],
    ["b","STRING","setmarkerbrush","STRING"],
    ["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","ANY","createvehiclelocal","ANY"],
    ["b","BOOL","and","BOOL"],
    ["b","BOOL","and","CODE"],
    ["b","BOOL","||","BOOL"],
    ["b","BOOL","||","CODE"],
    ["b","BOOL","or","BOOL"],
    ["b","BOOL","or","CODE"],
    ["b","ANY","isequalto","ANY"],
    ["b","STRING","createvehicle","ARRAY"],
    ["b","ANY","isequaltype","ANY"],
    ["b","CONFIG",">>","STRING"],
    ["b","OBJECT","setpos","ARRAY"],
    ["b","OBJECT","domove","ARRAY"],
    ["b","ARRAY","domove","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","STRING","setmarkershape","STRING"],
    ["b","STRING","setmarkershapelocal","STRING"],
    ["b","STRING","setmarkerbrushlocal","STRING"],
    ["b","STRING","setmarkerpos","ARRAY"],
    ["b","STRING","setmarkerposlocal","ARRAY"],
    ["b","STRING","setmarkertype","STRING"],
    ["b","STRING","setmarkertypelocal","STRING"],
    ["b","STRING","setmarkertext","STRING"],
    ["b","STRING","setmarkertextlocal","STRING"],
    ["b","STRING","setmarkerdir","SCALAR"],
    ["b","STRING","setmarkerdirlocal","SCALAR"],
    ["b","STRING","setmarkercolorlocal","STRING"],
    ["b","STRING","setmarkersize","ARRAY"],
    ["b","STRING","setmarkersizelocal","ARRAY"],
    ["b","STRING","setmarkeralpha","SCALAR"],
    ["b","STRING","setmarkeralphalocal","SCALAR"]
]
Assets 3
You can’t perform that action at this time.