Error: Matches#lambda$ unit Has Taken Some Bombing Unit Damage $43:386
-
Im working on my latest map and with this code
<property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false"I get this error message after 6-9 turns.
2.5.22294: Matches#lambda$unitHasTakenSomeBombingUnitDamage$43:386 - java.lang.NullPointerException ## Map feudal_nippon ## TripleA Version 2.5.22294 ## Java Version 11.0.6 ## Operating System Windows 10 ## Memory Heap utilization statistics [MB] Used Memory: 323 Free memory: 1656 Total memory: 1979 Max memory: 1979 ## Stack Trace Exception: java.lang.NullPointerException java.lang.Exception at games.strategy.triplea.delegate.Matches.lambda$unitHasTakenSomeBombingUnitDamage$43(Matches.java:386) at games.strategy.triplea.ai.pro.ProPurchaseAi.repair(ProPurchaseAi.java:105) at games.strategy.triplea.ai.pro.AbstractProAi.purchase(AbstractProAi.java:172) at games.strategy.triplea.ai.AbstractAi.start(AbstractAi.java:507) at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:537) at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:407) at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297) at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:82) at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:56) at java.base/java.lang.Thread.run(Thread.java:834)For a few turns it works fine then errors

It gives
- Territory units placement is based off <option name="canProduceXUnits" value="4"/>
- Bombing attacks units
Setting it to false and I get no error message but it does the two things I dont want.
- Territory units placement is based off the territory PU
- Bombing attacks the territory and not the unit.
Any guidance for where to look or what to test?
-
I had
<option name="canBeDamaged" value="true"/> <option name="canDieFromReachingMaxDamage" value="true"/> <option name="maxDamage" value="2"/>To stop the error add the following to the same unit
<option name="isConstruction" value="true"/> <option name="constructionType" value="Recruit"/> <option name="maxConstructionsPerTypePerTerr" value="1"/> <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login