Argument: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "[[Script (File)|" to "[[Script File|") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
'''Example:''' | '''Example:''' | ||
<sqf>[variable, 5, "string"] execVM "myScript.sqf"</sqf> | |||
The [[Array]] | The [[Array]] {{hl|[variable, 5, "string"]}} and the contained values are called the arguments given to the script. | ||
== Access == | == Access == | ||
In the script the argument can be accessed using the [[Magic Variables|magic variable]] | In the script the argument can be accessed using the [[Magic Variables|magic variable]] {{hl|_this}}. | ||
== See also == | == See also == |
Latest revision as of 00:40, 22 July 2022
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:
The Array [variable, 5, "string"] and the contained values are called the arguments given to the script.
Access
In the script the argument can be accessed using the magic variable _this.