Error when Loading Scenario
-
The next scenario I am working on for the repository is giving the following error when run.
"Could not find unitType:Artillery"
The log is
180610 21:21:17.294 [main] INFO o.t.game.client.HeadedGameRunner - Launching game, version: 2.6.210
207717 21:21:44.401 [SwingWorker-pool-1-thread-3] DEBUG g.s.e.data.gameparser.GameParser - Parsing game XML: C:\Users\Roger\triplea\downloadedMaps\Genuine39\games\Genuine39.xml
209010 21:21:45.694 [SwingWorker-pool-1-thread-3] ERROR g.s.e.data.gameparser.GameParser - Could not parse:C:\Users\Roger\triplea\downloadedMaps\Genuine39\games\Genuine39.xml, Could not find unitType:Artillery
games.strategy.engine.data.gameparser.GameParseException: Could not find unitType:Artillery
at games.strategy.engine.data.gameparser.GameParser.lambda$getUnitType$8(GameParser.java:293)
at java.base/java.util.Optional.orElseThrow(Optional.java:408)
at games.strategy.engine.data.gameparser.GameParser.getUnitType(GameParser.java:293)
at games.strategy.engine.data.gameparser.GameParser.parseUnitPlacement(GameParser.java:1011)
at games.strategy.engine.data.gameparser.GameParser.parse(GameParser.java:218)
at games.strategy.engine.data.gameparser.GameParser.lambda$parse$1(GameParser.java:135)
at org.triplea.java.UrlStreams.openStream(UrlStreams.java:73)
at games.strategy.engine.data.gameparser.GameParser.parse(GameParser.java:130)
at games.strategy.engine.data.gameparser.GameParser.parse(GameParser.java:107)
at games.strategy.engine.framework.startup.ui.panels.main.game.selector.GameSelectorModel.parseAndValidate(GameSelectorModel.java:104)
at games.strategy.engine.framework.startup.ui.panels.main.game.selector.GameSelectorModel.load(GameSelectorModel.java:66)
at games.strategy.engine.framework.startup.ui.panels.main.game.selector.GameSelectorPanel.lambda$gameSelected$8(GameSelectorPanel.java:398)
at games.strategy.engine.framework.ui.background.BackgroundTaskRunner.lambda$runInBackground$0(BackgroundTaskRunner.java:52)
at games.strategy.engine.framework.ui.background.BackgroundTaskRunner$1.doInBackground(BackgroundTaskRunner.java:115)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
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)
251727 17:08:02.582 [main] INFO o.t.game.client.HeadedGameI am thinking that is a capitalization issue, but the mod seems consistent in capitalization. The error seems to be in parsing, but it passes validation. I am using 2.6.246
-
@rogercooper
Ive spent a couple of hours on this and annoyingly cannot find the fault.
It works in 1.9, but not in 2.6.
Changed
a few of the artillery.png to Artillery.png
removed the artillerySupportable
tested the game Classic and WW2V3
All fail to load -
-
@wc_sumpton
As simple as that! -
@thedog so frustrating yet rewarding when it works. Has happened to me many times : )
-
@wc_sumpton I'm really surprised that the error didn't refer to that line and column number. Good catch.
@TheDog After reading the error I also suspected the .png file. I've run into those a few times. Best method is to replace the png file.
-
@wc_sumpton Thanks for your help. With a few tweaks, I will post it to the repository.
-
I was surprised also by the absent of a line number in the error. Also notepad++ did not find the error until I checked for Artillery " (note the space before the ending quote). Checking for Artillery (note no quote sign after the space) did not find the error. Mostly it was luck when I found it.
Cheers...