Parameter: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (removed select and used params)
m (category)
Line 20: Line 20:
* [[Argument]]
* [[Argument]]


[[Category: Scripting Topics]]
[[Category:Syntax]]

Revision as of 13:07, 2 January 2021

A parameter is a value that was passed to the actual script. All parameters are accessible over the array _this.


Example:

[5, "string"] execVM "script.sqf"


script.sqf

params ["_number","_string"];

_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.

See also