exec: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Command|= Comments | |||
____________________________________________________________________________________________ | |||
| ofp |= Game name | |||
|1.00|= Game version | |||
|arg= global |= Arguments in MP | |||
|eff= local |= Effects in MP | |||
____________________________________________________________________________________________ | |||
| Execute a script. The argument is passed to the script in the "_this" variable. Learn more about scripts under [[Scripts]]. |= Description | |||
____________________________________________________________________________________________ | |||
''' | | argument '''exec''' fileName |= Syntax | ||
|p1= argument: [[Any Value]] - the argument which should be passed to the script. To pass multiple arguments, use an array. |= Parameter 1 | |||
[[ | |p2= fileName: [[String]] - the name of the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order. If you refer to a script packed together with an addon, the path should look like this: "\ADDON_PBO_NAME\script.sqs" where ADDON_PBO_NAME is the name of the addon's *.pbo file without extension. |= Parameter 2 | ||
| [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | |||
|x1= <pre>[player, jeep] exec "getin.sqs"</pre> |= Example 1 | |||
____________________________________________________________________________________________ | |||
| [[call]] |= See also | |||
}} | |||
<h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
[ [[ | [[Category:Scripting Commands|EXEC]] | ||
[[Category:Scripting Commands OFP 1.96|EXEC]] | |||
[[Category:Scripting Commands OFP 1.46|EXEC]] | |||
[[Category:Scripting Commands ArmA|EXEC]] |
Revision as of 10:09, 2 August 2006
Description
- Description:
- Execute a script. The argument is passed to the script in the "_this" variable. Learn more about scripts under Scripts.
- Groups:
- Uncategorised
Syntax
- Syntax:
- argument exec fileName
- Parameters:
- argument: Any Value - the argument which should be passed to the script. To pass multiple arguments, use an array.
- fileName: String - the name of the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order. If you refer to a script packed together with an addon, the path should look like this: "\ADDON_PBO_NAME\script.sqs" where ADDON_PBO_NAME is the name of the addon's *.pbo file without extension.
- Return Value:
- Nothing
Examples
- Example 1:
[player, jeep] exec "getin.sqs"
Additional Information
- See also:
- call
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note