Argument: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (category)
m (Text replacement - "[[Script (File)|" to "[[Script File|")
Line 1: Line 1:
An '''argument''' is any value that ''is being passed'' to a [[:Category: Scripting Commands|scripting command]] or an executed [[Script (File)|script]] or [[Function|function]]. In the script or function this value is considered a [[Parameter|parameter]].
An '''argument''' is any value that ''is being passed'' to a [[:Category: Scripting Commands|scripting command]] or an executed [[Script File|script]] or [[Function|function]]. In the script or function this value is considered a [[Parameter|parameter]].





Revision as of 18:20, 28 August 2021

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"

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.

See also