Error after XML editing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error after XML editing

baconlol
Currently editing the XML of the Domination 1900 to suit a 1914 scenario.

Of course for editing the XML of such a large game, errors were expected. I've gotten many and solved most.

Currently I am getting this error upon Triplea1255 startup:

java.lang.IllegalArgumentException:  is not a valid int value
        at games.strategy.engine.data.DefaultAttachment.getInt(DefaultAttachment.java:48)
        at games.strategy.triplea.attatchments.TerritoryAttachment.setProduction(TerritoryAttachment.java:147)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.engine.data.GameParser.setValues(GameParser.java:1206)
        at games.strategy.engine.data.GameParser.parseAttachments(GameParser.java:1101)
        at games.strategy.engine.data.GameParser.parse(GameParser.java:125)
        at games.strategy.engine.framework.ui.NewGameChooserEntry.<init>(NewGameChooserEntry.java:27)
        at games.strategy.engine.framework.ui.NewGameChooserModel.createEntry(NewGameChooserModel.java:163)
        at games.strategy.engine.framework.ui.NewGameChooserModel.populateFromDirectory(NewGameChooserModel.java:180)
        at games.strategy.engine.framework.ui.NewGameChooserModel.populate(NewGameChooserModel.java:82)
        at games.strategy.engine.framework.ui.NewGameChooserModel.<init>(NewGameChooserModel.java:35)
        at games.strategy.engine.framework.startup.mc.GameSelectorModel.loadDefaultGame(GameSelectorModel.java:217)
        at games.strategy.engine.framework.startup.ui.MainFrame.<init>(MainFrame.java:61)
        at games.strategy.engine.framework.GameRunner2$1.run(GameRunner2.java:61)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Could not parse:C:\Program Files (x86)\TripleA\triplea_1_2_5_5\maps\domination\games\Domination 1914.xml
games.strategy.engine.data.GameParseException: Error setting property:production cause: is not a valid int value
        at games.strategy.engine.data.GameParser.setValues(GameParser.java:1214)
        at games.strategy.engine.data.GameParser.parseAttachments(GameParser.java:1101)
        at games.strategy.engine.data.GameParser.parse(GameParser.java:125)
        at games.strategy.engine.framework.ui.NewGameChooserEntry.<init>(NewGameChooserEntry.java:27)
        at games.strategy.engine.framework.ui.NewGameChooserModel.createEntry(NewGameChooserModel.java:163)
        at games.strategy.engine.framework.ui.NewGameChooserModel.populateFromDirectory(NewGameChooserModel.java:180)
        at games.strategy.engine.framework.ui.NewGameChooserModel.populate(NewGameChooserModel.java:82)
        at games.strategy.engine.framework.ui.NewGameChooserModel.<init>(NewGameChooserModel.java:35)
        at games.strategy.engine.framework.startup.mc.GameSelectorModel.loadDefaultGame(GameSelectorModel.java:217)
        at games.strategy.engine.framework.startup.ui.MainFrame.<init>(MainFrame.java:61)
        at games.strategy.engine.framework.GameRunner2$1.run(GameRunner2.java:61)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Could be caused by a simple typo... I didn't alter the XML enough to confuse the engine. Or at least I don't think I did.

(ps: does this belong in modding?)
You can't give the employees any more ammo. And no, you shouldn't give my boss any either.
Reply | Threaded
Open this post in threaded view
|

Re: Error after XML editing

Veqryn
Administrator
if you read the error messages you can usually figure out what the problem is

here are the top 3 lines of your error:

java.lang.IllegalArgumentException:  is not a valid int value
        at games.strategy.engine.data.DefaultAttachment.getInt(DefaultAttachment.java:48)
        at games.strategy.triplea.attatchments.TerritoryAttachment.setProduction(TerritoryAttachment.java:147)


you can see from this that something inside "TerritoryAttachment.setProduction" "is not a valid int value"
int = integer

so yes, it must be  typo

scan your territory attachments production settings for a typo

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: Error after XML editing

ComradeKev
Administrator
In reply to this post by baconlol
baconlol wrote
java.lang.IllegalArgumentException:  is not a valid int value        at games.strategy.engine.data.DefaultAttachment.getInt(DefaultAttachment.java:48)
        at games.strategy.triplea.attatchments.TerritoryAttachment.setProduction
There's the error.  You probably have a space or null in one of the territories' Production options.

Have a look and let me know if you still can't find it.
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: Error after XML editing

baconlol
Tuns out ctl+f searching for : ""

is a great way to find null values.

I figured that the error was for territoryattatchments... but I scimmed over them several times without finding it until I remembered the easier method. And the map is actually running... so far.

Thanks guys.
You can't give the employees any more ammo. And no, you shouldn't give my boss any either.