I'm using lua for scripting in my iOS app. I'm trying to do the simple thing of adding another lua file with 'require'
My Lua files are contained within my project in XCode in the following directory:
Classes/Lua_Code/main.lua
Classes/Lua_Code/luaBase.lua
main.lua is trying to require luaBase.lua as follows -
require('luaBase')
But it never seems to find the file, even though it's in the same folder as main.lua.
I get the following errors in the log
no field package.preload['luaBase'] no file
'./luaBase.lua' no file
'/usr/local/share/lua/5.1/luaBase.lua' no file
'/usr/local/share/lua/5.1/luaBase/init.lua' no file
'/usr/local/lib/lua/5.1/luaBase.lua' no file
'/usr/local/lib/lua/5.1/luaBase/init.lua' no file
'./function/luaBase.lua' no file './luaBase.so' no file
'/usr/local/lib/lua/5.1/luaBase.so' no file
'/usr/local/lib/lua/5.1/loadall.so'
I've tried every other suggestion here, and nothing works..
Can anyone help?
print( os.execute'pwd' )? - hjpotter92