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 TypeDescription
boolTrue if the new script have been executed correctly

Parameters

ParameterTypeDescription
1stringThe 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")

Back to Scripting API