Page 1 of 1

entity system error

Posted: Sun Nov 03, 2013 7:45 pm
by Fatmat927
hello everyone I am trying to do a shooter so I had to do entities but for some reason, even though i did pretty much exactly as the tutorial wich is: http://www.youtube.com/watch?v=E1MGLTdafu0 and the part 8 but it still tells me this:
Error

entities/box.lua:2: attempt to index global 'ents' (a nil value)


Traceback

entities/box.lua:2: in main chunk
[C]:in function 'require'
game.lua:1: in main chunk
[C]: in function 'require'
main.lua:1: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'


thats it and here is the .love
shooter.love
(5.2 KiB) Downloaded 133 times

Re: entity system error

Posted: Sun Nov 03, 2013 8:07 pm
by iPoisonxL
You need to add this on top of box.lua for it to work:

Code: Select all

require("entities")
EDIT: Also, remember that everything is case-sensitive in Lua. meaning that ents.startup() is NOT the same as ents.Startup()

Re: entity system error

Posted: Sun Nov 03, 2013 9:28 pm
by Fatmat927
I am pretty ashamed of this error hahahahah but thank you

Re: entity system error

Posted: Sun Nov 03, 2013 11:11 pm
by iPoisonxL
Fatmat927 wrote:I am pretty ashamed of this error hahahahah but thank you
We all make this error at one point :)