That makes more sense.
Btw instead of checking if the combat event is an error and which actionResult it has inside lua, you should use AddFilterForEvent and let the game handle filtering. You may need to split the handling over multiple functions, but it's much faster that way. See
this wiki page for what I mean.