Jump to navigation Jump to search
- Reads and processes the content of the specified file. Preprocessor is C-like, supports comments using // or /* and */ and PreProcessor Commands. Due to the hard-drive access this command executes and the lack of caching this command should not be used in time-critical script loops.
- preprocessFile fileName
- fileName: String - Path to the file and name of the file
- Return Value:
- Example 1:
- See also:
- fileExists preprocessFileLineNumbers loadFile Function SQF Syntax call spawn execVM PreProcessor Commands
- Posted on Mar 04, 2008 - 22:35 (UTC)
- File path is always relative to mission directory. If script dir\a.sqf includes dir\b.sqf, use "dir\b.sqf" and not "b.sqf".
- Posted on Jul 08, 2011 - 10:59 (UTC)
- Use preprocessFileLineNumbers instead as it provides more context information on error.
- Posted on Dec 17, 2013 - 13:44 (UTC)
- preprocessFile and preprocessFileLineNumbers is that the latter adds #line directive to the target file, which allows to log the __LINE__ error happened at and the __FILE__ error happened in.
- Posted on Jul 25, 2014 - 18:43 (UTC)
Essentially what the preprocessFile command does is it refers to the contents of a file as a string:
<t align = 'center' valign = 'middle' shadow = '0' size = '2'>structured text</t>