So I got this chunk of code that for some reason is giving me a null exception on LOVE
function enemies_controller:spawnEnemy(x, y, rad)
enemy = {}
enemy.x = x
enemy.y = y
enemy.rad = rad
enemy.speedMulti = 1
table.insert(enemies_controller.enemies, enemy)
end
And the function calling it like this:
enemies_controller.spawnEnemy(100, 100, 50)
The thing is that is giving me a null exception on the enemy.rad when i draw, cause enemy.x takes the second function parameter and enemy.y the third, and none takes the first one... So i am unsure of what is happening