love.filesystem.include( filename )
Includes and runs a Lua file every time the function is called. (Does not
check if the file is included already).
Usage
love.filesystem.include( filename )
Arguments
filenameThe filename of the file to read.
Returns
Nothing
Examples
Example 1: Simple highscore.
function save_highscore()
local file = love.filesystem.newFile("highscore.lua", love.file_write)
love.filesystem.open(file)
love.filesystem.write(file, "highscore = { bob = 5, tom = 200, jane = 4000 }")
love.filesystem.close(file)
end
function load_highscore()
love.filesystem.include("highscore.lua")
-- Table "highscore" is now available.
print("Jane totally got: " .. highscore.jane)
end