call
From Bohemia Interactive Community
Click on the images for descriptions
Introduced in
- Game:
- Operation Flashpoint: Resistance
- Version:
- 1.85
Description
- Description:
- Executes the function string.
The argument(s) (if any) are passed as _this. (argument(s) are passed in an array).
To execute a sleep function in the called code, execute it with spawn instead.
Syntax
- Syntax:
- argument(s) call body
- Parameters:
- argument(s): Any Value - Optional. Argument that is passed to the function in the "_this" variable.
- body: Code - A function body provided directly 'inline' or the String returned from the commands loadFile or preprocessFile.
- Return Value:
- Anything - The last value given in the function is returned. See the topic Function for more information.
Examples
- Example 1:
call {"x = 3"}- Example 2:
- Operation Flashpoint syntax:
_n = 3;Armed Assault syntax:
call format [{var%1 = 0},_n];_n = 3;result of both syntaxes is var3 = 0
call compile format ["var%1 = 0",_n]; - Example 3:
- Operation Flashpoint syntax:
_fAdd = loadFile "add.sqf" [1,2] call _fAddArmed Assault syntax:_fAdd = compile loadFile "add.sqf" _result = [1,2] call _fAdd
Additional Information
- Multiplayer:
- -
- See also:
- spawn, compile, preprocessFile
Notes
Notes