Oxygen 2 Misc Documentation: Difference between revisions
Jump to navigation
Jump to search
m (Added category.) |
Lou Montana (talk | contribs) m (Text replacement - "\[\[[Cc]ategory:ArmA:[ _]?([^|]+)\]\]" to "{{GameCategory|arma1|$1}}") |
||
Line 65: | Line 65: | ||
_dirs=nil; | _dirs=nil; | ||
{{GameCategory|arma1|_Official_Tools}} |
Revision as of 14:24, 6 January 2021
if then else
if (something == 1) then {fred=1;}else{fred=2;};
functions
_SomeFunc= { private ["_in","_out"]; _in=_this@0; if (_in== 1) then {_out=1;}else{_out=2;}; out // lack of semi colon returns content of out equally if (_in== 1) then {1}else{2}; // achieves same };
comment
comment "comment" /* comments
- /
// comments
messageBox [text,nButtons]
Returns ID of pressed button
Shows message box with text and buttons.
nButtons is undocumented but probably follows the msoft conventions of ok, cancel, blah, + warning icons
nButtons 0: == OK only
isnil
example:
if (isnil "_exists") ExitWith(_file_exists=false;};
if (!isnil "_exists") ExitWith(_file_exists=true;};
note that exitwith is pretty close to useless it ONLY breaks out of the current braces, not, out of a subroutine per se
nil
example:
_dirs= shellCmdOpenPipe(".... { process... } _dirs=nil;