local ourIndex = tonumber(matches[2]) if Bashmatic.enemies.group then local area = GetRoomAreaName(GetRoomArea(GetPlayerRoom())) or nil if area == nil then cecho("\nBashmatic: Attempted to clear area targets but got a bad area.\nGot: " .. area .. "") return end if not table.contains(Bashmatic.enemies.targets, area) then cecho("\nBashmatic: You don't have any enemies for the area " .. area .. "") return end local size = table.size(Bashmatic.enemies.targets.area) if ourIndex > size then cecho("\nBashmatic: Index out of range for this area. There are only " .. size .. " targets stored.") return end table.remove(Bashmatic.enemies.targets.area, ourIndex) cecho("\nBashmatic: Removed target from the area list.") else local size = table.size(Bashmatic.enemies.targets) if ourIndex > size then cecho("\nBashmatic: Index out of range. There are only " .. size .. " targets stored.") return end table.remove(Bashmatic.enemies.targets, ourIndex) cecho("\nBashmatic: Removed target from the list.") end