include( filename )

To make your Lua code more manageable and readable you may consider splitting up scripts into different files. To include this code from the main Lua file you can use the include global function.

Arguments

Name Type Description
filename String File name of the file to include

Example

--Suppose we have code in a file called test.lua - we would add this to our main Lua file.
include( "test.lua" )
--We can also include files in subdirectories
include( "Example/test.lua" )