Oxygen 2 Misc Documentation: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ") |
Lou Montana (talk | contribs) m (Text replacement - "y[ _]*\|[ _]*(arma[0-9]+)[ _]*\|[ _]+" to "y|$1|") |
||
Line 65: | Line 65: | ||
_dirs=nil; | _dirs=nil; | ||
{{GameCategory|arma1| | {{GameCategory|arma1|Official_Tools}} |
Revision as of 13:12, 22 June 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;