loadFile

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Operation Flashpoint: Resistance version 1.90
  

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint: Resistance
Version:
1.90

Description

Description:
Return content of given filename as string. If you plan to compile said string, be aware that the file shouldn't contain comments or compile will throw an error. If there are comments, use preprocessFile/preprocessFileLineNumbers instead.

Syntax

Syntax:
loadFile fileName
Parameters:
fileName: String
Return Value:
String

Examples

Example 1:
_contents = loadFile "wantedString.txt";
Example 2:
_contents = compile loadFile "myFunction.sqf"; // will compile string into code

Additional Information

Multiplayer:
-
See also:
preprocessFilepreprocessFileLineNumbers

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted on 25 January 2016 - 12:13
James
Notice that you will have to activate file patching via -filePatching. Otherwise, execVM and loadFile will *not* load any files outside your mission folder (like the global scripts).

Bottom Section