Should this be possible:
require("subfolder/file.lua")
I get errors… [import]uid: 8353 topic_id: 3161 reply_id: 303161[/import]
Should this be possible:
require("subfolder/file.lua")
I get errors… [import]uid: 8353 topic_id: 3161 reply_id: 303161[/import]
You can’t have lua files inside a subfolder. [import]uid: 5712 topic_id: 3161 reply_id: 9264[/import]
this works in my simulator
main.lua
[lua]ASSET_PATH=“images/”
stufftest=require(“stuff/stufftest”)
stufftest.stuffit()
img1 = display.newImage(ASSET_PATH…“berry/berry.png”)
img1.x=100[/lua]
stuff/stufftest.lua
[lua]module(…,package.seeall)
function stuffit()
print “stuffit!”
img2 = display.newImage(ASSET_PATH…"/berry/stuff.png")
end[/lua]
however 2 things to note
dont stick .lua on the end [import]uid: 6645 topic_id: 3161 reply_id: 10840[/import]