love.filesystem.require( filename )
It is safe to include the same file more than once. LÖVE keeps track of included
files to prevent reparsing. (If you want the same file to be included multiple
times, take a look at love.filesystem.include( filename ).
Usage
love.filesystem.require( filename )
Arguments
filenameThe filename of the file to read.
Returns
Nothing
Examples
Example 1: Including files.
-- main.lua (this file)
-- File that contains "other_var"
love.filesystem.require("other.lua")
-- At this point, stuff from other.lua can be used.
function load()
print(other_var)
end