Help with "require" needed
Posted: Wed Oct 17, 2012 8:36 am
Hey guys,
I'm new to Love and Lua and all this, so please don't be mad if this is a noobish question...
I'm having trouble with the 'require' module... I want to require player.lua in main.lua. I think i have done it the same as i have seen in the official lua documentation and in other examples, mainly from these forums, but all i get is the error message:
Error
player.lua:3 attempt to index global 'player' (a nil value)
Traceback
player.lua:3 in main chunk
[C]: in function 'require'
main.lua:3 in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
(what does all this mean?)
I have looked through these forums, and the rest of the internet, but i cant seem to find what im doing wrong...
Someone help please :s
I'm new to Love and Lua and all this, so please don't be mad if this is a noobish question...
I'm having trouble with the 'require' module... I want to require player.lua in main.lua. I think i have done it the same as i have seen in the official lua documentation and in other examples, mainly from these forums, but all i get is the error message:
Error
player.lua:3 attempt to index global 'player' (a nil value)
Traceback
player.lua:3 in main chunk
[C]: in function 'require'
main.lua:3 in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
(what does all this mean?)
I have looked through these forums, and the rest of the internet, but i cant seem to find what im doing wrong...
Someone help please :s