I was "hunting" when this appears and suddenly stop attacking, what could be ?

21:41:13 error in Cavebot script AtkHotkey:
["local bestDir, bestDirCount, bestSpell = ..."]:AtkHotkey:58 bad argument #1 to 'max' (number expected, got nil)
stack traceback:
["local bestDir, bestDirCount, bestSpell = $self.dir, math.max..."]:AtkHotkey:58 in user script