Map not loading correctly.

  • I am pretty sure that my nations are getting their own default color, but the game doesn't like them or something. I get grey squares instead of the relief tiles or base tiles for the countries that have different colors.

    The game throws a 'NoSuchElementException' error

    Console shows the following

    Aug 12, 2020 4:33:25 PM lambda$initializeClientSettingAndLogging$0
    SEVERE: null
    	at games.strategy.triplea.ui.mapdata.DefaultColors.nextColor(
    	at games.strategy.triplea.ui.mapdata.MapData.getPlayerColor(
    	at games.strategy.triplea.ui.screen.drawable.LandTerritoryDrawable.draw(
    	at games.strategy.triplea.ui.screen.drawable.LandTerritoryDrawable.draw(
    	at games.strategy.triplea.ui.screen.Tile.draw(
    	at games.strategy.triplea.ui.screen.Tile.drawImage(
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
    	at java.base/java.util.concurrent.ThreadPoolExecutor$
    	at java.base/

  • @ff03k64

    I've seen this error a couple of times, and I don't know what causes it. In my map it is somehow connected to territoryAttachment's which have: "<option name="isImpassable" value="true"/> If I comment out or remove that option the the map loads fine. But I have not been able to figure out the cause.

    Not much, but its a start.


  • Unfortunately that isn't my problem. It has something to do with the territory ownership. I was testing something else, and realized when i changed the ownership of one territory it made more chunks not load. After that i specifically changed some territory ownership, and that made the grey squares load correctly.

  • Admin

    It could be player default colors. There are 8 defaults, beyond that and you need to explicitly define the player colors (I believe in

  • That was it, thanks!

  • The NoSuchElementException in Java is thrown when one tries to access an iterable beyond its maximum limit. This means that, this exception is thrown by various accessor methods to indicate that the element being requested does not exist . The next() method in Java returns the next element in the iteration or NoSuchElementException if the iteration has no more elements.

    The solution to this exception is to check whether the next position of an iterable is filled or empty . The following methods are used to check the next position:

    • hasNext()
    • hasMoreElements()

Log in to reply