entity system error

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Fatmat927
Prole
Posts: 42
Joined: Wed Sep 18, 2013 1:15 am

entity system error

Post 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 129 times
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: entity system error

Post 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()

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
Fatmat927
Prole
Posts: 42
Joined: Wed Sep 18, 2013 1:15 am

Re: entity system error

Post by Fatmat927 »

I am pretty ashamed of this error hahahahah but thank you
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: entity system error

Post by iPoisonxL »

Fatmat927 wrote:I am pretty ashamed of this error hahahahah but thank you
We all make this error at one point :)

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 44 guests