Parameter: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<tt>([a-zA-Z0-9\. _"\\']+)<\/tt>" to "{{hl|$1}}") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 4: | Line 4: | ||
'''Example:''' | '''Example:''' | ||
<sqf>[5, "text"] execVM "script.sqf"</sqf> | |||
script.sqf | script.sqf | ||
<sqf>params ["_number","_string"];</sqf> | |||
{{hl|_number}} and {{hl|_string}} are considered the parameters of the script, and are filled with the values that were provided in the array. {{hl|_number}} now contains the value '''5''', while _string now contains the value '''string'''. | {{hl|_number}} and {{hl|_string}} are considered the parameters of the script, and are filled with the values that were provided in the array. {{hl|_number}} now contains the value '''5''', while _string now contains the value '''string'''. |
Latest revision as of 16:40, 22 July 2022
A parameter is a value that was passed to the actual script. All parameters are accessible over the array _this.
Example:
script.sqf
_number and _string are considered the parameters of the script, and are filled with the values that were provided in the array. _number now contains the value 5, while _string now contains the value string.