loadFile
Jump to navigation
Jump to search
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.
- Groups:
- Program Flow
Syntax
Examples
- Example 1:
_contents = loadFile "wantedString.txt";
- Example 2:
_contents = compile loadFile "myFunction.sqf"; // will compile string into code
Additional Information
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
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).
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Resistance version 1.90
- Operation Flashpoint: Resistance: New Scripting Commands
- Operation Flashpoint: Resistance: Scripting Commands
- Command Group: Program Flow
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands