#include 35
Include an external file into the code of a lua script. Useful to create files with collections of functions to share across different script. Included files must be placed within the folder '[mission folder]/scripts/general/' or any subfolder. The script will be pre-processed and aded to the final code before executing it
Return value
Return Type | Description |
---|---|
void | This function doesn't return anything |
Parameters
Parameter | Type | Description |
---|---|---|
1 | string | The sub path and file name to load |
Examples
Example 143
-- include a subfile from "<mission folder>/scripts/general/somefile.lua"
#include "somefile.lua"
Example 144
-- include a subfile from "<mission folder>/scripts/general/somefolder/somefile.lua"
#include "somefolder/somefile.lua"