Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Map not loading correctly.

    Map Making
    4
    6
    579
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      ff03k64 last edited by

      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 org.triplea.game.client.HeadedGameRunner lambda$initializeClientSettingAndLogging$0
      SEVERE: null
      java.util.NoSuchElementException
      	at com.google.common.collect.AbstractIndexedListIterator.next(AbstractIndexedListIterator.java:75)
      	at games.strategy.triplea.ui.mapdata.DefaultColors.nextColor(DefaultColors.java:30)
      	at games.strategy.triplea.ui.mapdata.MapData.getPlayerColor(MapData.java:496)
      	at games.strategy.triplea.ui.screen.drawable.LandTerritoryDrawable.draw(LandTerritoryDrawable.java:45)
      	at games.strategy.triplea.ui.screen.drawable.LandTerritoryDrawable.draw(LandTerritoryDrawable.java:29)
      	at games.strategy.triplea.ui.screen.Tile.draw(Tile.java:69)
      	at games.strategy.triplea.ui.screen.Tile.drawImage(Tile.java:54)
      	at games.strategy.triplea.ui.panels.map.MapPanel.lambda$paint$7(MapPanel.java:742)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      
      1 Reply Last reply Reply Quote 0
      • W
        wc_sumpton last edited by

        @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.

        Cheers...

        1 Reply Last reply Reply Quote 0
        • F
          ff03k64 last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • LaFayette
            LaFayette Admin last edited by

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

            1 Reply Last reply Reply Quote 0
            • F
              ff03k64 last edited by

              That was it, thanks!

              1 Reply Last reply Reply Quote 0
              • W
                walemark last edited by

                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()
                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post
                Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums