Some changes to your functions (SORRY) :D. But i join all so i now what is wrong etc

And now, units are visible on screen (i changes player number from 10 to
3, becouse in the map when gorund is 1 it was bad)