Argument: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
Line 10: Line 10:
== Access ==
== Access ==


In the script the argument can be accessed using the magic variable <tt>_this</tt>.
In the script the argument can be accessed using the [[Magic Variables|magic variable]] <tt>_this</tt>.


== See also ==
== See also ==

Revision as of 03:05, 22 December 2006

An argument is any value that is being passed to a scripting command or an executed script or function. In the script or function this value is considered a parameter.


Example:

[variable, 5, "string"] execVM "myScript.sqf"

variable, 5 and "string" are called the arguments given to the script. You could even go as far to call the Array containing these values the single argument.

Access

In the script the argument can be accessed using the magic variable _this.

See also