Difference between revisions of "require"

(Create page)
 
(Explains require some more)
Line 6: Line 6:
  
 
'''Note:'''  
 
'''Note:'''  
Do not include the ".lua" on the end of the path.  
+
Do not include the ".lua" on the end of the path.
 +
 
 +
This function is included on this wiki because LÖVE changes the way it works: it searches in the [[love.filesystem|save directory]] and then in the game directory or the .love.
  
 
== See Also ==
 
== See Also ==
 
[http://www.lua.org/pil/8.1.html Programming in Lua]
 
[http://www.lua.org/pil/8.1.html Programming in Lua]

Revision as of 12:05, 1 August 2011

Opens and executes a Lua file.

require "foo"

Note: Do not include the ".lua" on the end of the path.

This function is included on this wiki because LÖVE changes the way it works: it searches in the save directory and then in the game directory or the .love.

See Also

Programming in Lua