Closed dgfitch closed 14 years ago
A HornetEgg checks to see if it's about to instantiate a Hornet in a solid area of the level, and if so, it doesn't instantiate that Hornet. I've encountered this error, and staved it off by making the egg round the hornets' coordinates to integers (rounding up in this case). But if an egg were at the very rightward or bottom edge of the level, and then got blown up, then it might be possible for a rounded-up hornet's coordinates to be outside the array bounds.
Basically, I recommend a few changes:
I wish there was an easier way to pull the error out of LOVE... this happened going to level 2 of a Hard game.
This is probably something I boned when I object-ized Level?
objects/Level.lua:397: attempt to index field '?' (a nil value)
Stack traceback: objects/Level.lua:397: in function 'solidTileAt' objects/enemies/HornetEgg.lua:31: in function 'update' objects/Level.lua:46: in function 'update'