loadFile

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Operation Flashpoint: Resistance version 1.90Effects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint: Resistance
Version:
1.90

Description

Description:
Return content of given filename.

Syntax

Syntax:
String = loadFile "filename"
Parameters:
filename: String
Return Value:
String

Examples

Example 1:
_contents = loadFile "myFunction.sqf"

Additional Information

Multiplayer:
Behaviour unknown.
See also:
preprocessFile

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

Unknown
Unknown
In Armed Assault, the 'loadfile' command must be preceded by the 'compile' command to work.
Ex OFP 1.96: _falarmEvent = loadfile ("syswarn\falarmEvent.sqf")
Ex ArmA 1.0: _falarmEvent = compile loadfile ("syswarn\falarmEvent.sqf")
Tactii 01:10, 11 July 2007 (CEST)
Tactii
This is not entirely accurate. loadFile only needs to be preceded with compile when loading code (for example, a function contained in an .sqf file). Using loadFile without compile will return a string, which, in some cases, is exactly what you want.

Bottom Section

Personal tools
Buy ArmA now!