I think it has to do with your use of ENUMVALUE/ENUNKEY while you're actively deleting values/keys. If you do an ENUMVALUE and you delete the second value, then automatically the third entry is now the second. So, if you then increase the eNUMVALUE by oen you will then get the fourth value. That's why I'd ratehr use ArrayEnumValue() and ArrayEnumKey() to get the keys/values first, then delete them. Otherwise, do the ENUMVALUE and if you're deleting that value, do not increase the index by one but reissue the ENUMVALUE with the same index.
_________________________
There are two types of vessels, submarines and targets.