Forgetting nil checks

Always verify an entity exists:

if e ~= nil then
    gol.attackAt(e)
end

Passing wrong values

Pass the entire entity table, not individual fields:

Correct:

gol.attackAt(e)

Incorrect:

gol.attackAt(e.x)