problems using require("filename.lua")
Posted: Tue Aug 13, 2013 5:11 am
--EDIT--
I have resolved my problem, instead of 'require("entities.lua")' it should have been 'require("entities")'
Sorry for wasting anyones time.
---------
so basically what i have is a directory with my main.lua and another .lua file. For instance lets say i have a doesntwork.lua.. (lol)... anywhoo
in my main.lua i have
with that i get the error: "module 'doesntwork.lua' not found: (then it lists the directories it searched in)"
Am I doing something wrong?
NOTE- I have the files in 'documents/luastuff/lovetest/'
I have resolved my problem, instead of 'require("entities.lua")' it should have been 'require("entities")'
Sorry for wasting anyones time.
---------
so basically what i have is a directory with my main.lua and another .lua file. For instance lets say i have a doesntwork.lua.. (lol)... anywhoo
in my main.lua i have
Code: Select all
function love.load()
require("doesntwork.lua")
end
Am I doing something wrong?
NOTE- I have the files in 'documents/luastuff/lovetest/'