daemon_n, XEPOMAHT, Berserker, thanks for the answers.
I have another question, how can I remove a hero with error. For some reason, a hero is put on the map without assinging an owner. By checking with erm, I have this:
IF:M returns the correct coordinates and -1 as the owner.
As a result, the game crashes at the start of this hero's turn. What I want to do is to either correct the owner or remove the hero from the map so that it won't cause error.