So I was following this tutorial: http://coronalabs.com/blog/2013/05/28/tutorial-goodbye-globals/
I’ve encountered a problem with the following error message: “module ‘mydata’ not found:resource(mydata.lu) does not exist in archive.” I made sure that I didn’t misstype anything, but the error still persist.
I have two files; main.lua and mydata.lua. In the mydata.lua file, I have this:
[lua]
local M = {
M.Playerscore = 0;
}
return M;
[/lua]
and in the main.lua I have this:
[lua]
local data = require(“mydata”)
function main()
print("Playe score: " … data.Playerscore);
end
main()
[/lua]
Can anyone help me with this problem of access variables in a different module file? One thing to note is that the mydata.lua file is in the same place as the main.lua directory