loadFile
- Arma 3 v0.50
- First in Operation Flashpoint v1.90
Command · Markdown · JSON · original wiki page
Description
Returns the content of given files. If you plan to compile said string, be aware that the file should not contain comments or compile will throw an error. If there are comments, use preprocessFile/preprocessFileLineNumbers instead.
Warning
If the file is not prepared using UTF-8 encoding and contains some characters with codes > 127, they might convert incorrectly.
Syntax
loadFile fileName
Parameters:
fileName: String
Returns: String
Examples
Example 1
_contents = loadFile "wantedString.txt";
Example 2
_contents = compile loadFile "myFunction.sqf"; // will compile string into code