er2.run 32
Execute an external file without stopping execution of current scrip. External file must be placed within the folder '[mission folder]/scripts/general/' or any subfolder
Return value
Return Type | Description |
---|---|
bool | True if the new script have been executed correctly |
Parameters
Parameter | Type | Description |
---|---|---|
1 | string | The sub path and file name to load |
Examples
Example 147
-- Execute a subfile from "<mission folder>/scripts/general/somefile.lua"
er2.run("somefile.lua")
Example 148
-- Execute a subfile from "<mission folder>/scripts/general/somefolder/somefile.lua"
er2.run("somefolder/somefile.lua")