Odd error message

Do you need help installing or using ZunTzu? Would you like to report a bug?

Moderators: Ichibrothers, Cambronne

PeteB
Posts: 13
Joined: 19 Nov 2016, 09:30
Location: UK

Odd error message

Post by PeteB »

Hi

I have created a fair few gameboxes, but a recent one has led to the following error message which I have not seen before

'Error of Type Format Exception: Input string was not in a correct format'

Any idea what might cause that? Have triple checked the syntax and cannot find anything wrong!

Any help appreciated

P
Chobham_1980

Yep - get this one too!

Post by Chobham_1980 »

Good to see you're still visiting the forums PeteB . . . 8)

I use a 'master-codelet-file' to produce boxes but have gotten this error too, albeit not so often {?Usually a 'copy&paste' syntax error with a blank <space>?}. I'll keep an eye out and report here if seen again and have a better theory.

To keep errors under control, I have begun making boxes in stages until the project is finished. This helps me compartmentalize the project and makes debugging so much quicker. Mostly, I use this method with the bigger boxes like Europa games. With smaller boxes, I tend to redo the code from scratch (<10 minutes).

Overall, I have seen this error only a few times and finding the bug to squash is pure :evil:


Keep making boxes! Rich :P

EDIT: Spelling
PeteB
Posts: 13
Joined: 19 Nov 2016, 09:30
Location: UK

Post by PeteB »

Thanks

Will keep looking for errors. It must be syntax but I cannot find it at the moment!

P
User avatar
Ichibrothers
211
Posts: 70
Joined: 15 Jul 2007, 16:27
Location: Rutland, MA

Post by Ichibrothers »

PeteB wrote:It must be syntax but I cannot find it at the moment!

Want to try pasting it here Pete? Maybe some fresh eyes can pick up on it.
PeteB
Posts: 13
Joined: 19 Nov 2016, 09:30
Location: UK

Post by PeteB »

Feel free!

<?xml version="1.0" encoding="windows-1252" ?>
<game-box
name="ILF2"
description="ILF2"
copyright="TGC"
startup-scenario="ILF2.zts">

<dice-hand type="D10">
<dice count="10" color="FFFFFF" pips="000000"/>
</dice-hand>

<map name="ILF2 Map" image-file="ILF2 Map.jpg" resolution="300 dpi"/>

<counter-sheet name="ILF2 Counters"
front-image-file="ILF2 Counters front.jpg" front-resolution="300 dpi"
back-image-file="ILF2 Counters back.jpg" back-resolution="300 dpi">

<counter-section rows="2" columns="10"
front-left="250" front-top="177" front-right="1364" front-bottom="536"
back-left="2054" back-top="170" back-right="3161" back-bottom="537"/>

<counter-section rows="2" columns="10"
front-left="1430" front-top="175" front-right="2543" front-bottom="536"
back-left="875" back-top="173" back-right="1985" back-bottom="537"/>

<counter-section rows="2" columns="3"
front-left="2608" front-top="174" front-right="3161" front-bottom="537"
back-left="255" back-top="172" back-right="809" back-bottom="535"/>

<counter-section rows="2" columns="10"
front-left="251" front-top="601" front-right="1364" front-bottom="962"
back-left="2054" back-top="603" back-right="3167" back-bottom="965"/>

<counter-section rows="2" columns="10"
front-left="1431" front-top="601" front-right="2545" front-bottom="962"
back-left="874" back-top="600" back-right="1988" back-bottom="962"/>

<counter-section rows="2" columns="3"
front-left="2610" front-top="602" front-right="3165" front-bottom="962"
back-left="254" back-top="599" back-right="808" back-bottom="961"/>

<counter-section rows="2" columns="10"
front-left="251" front-top="1029" front-right="1368" front-bottom="1389"
back-left="2056" back-top="1030" back-right="3165" back-bottom="1392"/>

<counter-section rows="2" columns="10"
front-left="1432" front-top="1029" front-right="2545" front-bottom="1388"
back-left="`874" back-top="1027" back-right="1988" back-bottom="1390"/>

<counter-section rows="2" columns="3"
front-left="2612" front-top="1028" front-right="3164" front-bottom="1389"
back-left="255" back-top="1025" back-right="808" back-bottom="1387"/>

<counter-section rows="2" columns="10"
front-left="251" front-top="1456" front-right="1366" front-bottom="1812"
back-left="2054" back-top="1457" back-right="3165" back-bottom="1817"/>

<counter-section rows="2" columns="10"
front-left="1432" front-top="1454" front-right="2545" front-bottom="1815"
back-left="875" back-top="1454" back-right="1988" back-bottom="1815"/>

<counter-section rows="2" columns="3"
front-left="2614" front-top="1455" front-right="3165" front-bottom="1814"
back-left="253" back-top="1454" back-right="806" back-bottom="1810"/>

<counter-section rows="2" columns="10"
front-left="252" front-top="1881" front-right="1366" front-bottom="2236"
back-left="2054" back-top="1882" back-right="3163" back-bottom="2243"/>

<counter-section rows="2" columns="10"
front-left="1434" front-top="1879" front-right="2548" front-bottom="2238"
back-left="875" back-top="1881" back-right="1988" back-bottom="2240"/>

<counter-section rows="2" columns="3"
front-left="2613" front-top="1879" front-right="3165" front-bottom="2241"
back-left="252" back-top="1887" back-right="806" back-bottom="2237"/>

</counter-sheet>

<counter-sheet name="ILF2 Markers"
front-image-file="ILF2 Markers.jpg" front-resolution="300 dpi">

<counter-section rows="2" columns="15"
front-left="144" front-top="228" front-right="2259" front-bottom="499"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="558" front-right="2259" front-bottom="869"/>

<counter-section rows="2" columns="15"
front-left="145" front-top="887" front-right="2260" front-bottom="1159"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="1217" front-right="2260" front-bottom="1489"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="1547" front-right="2260" front-bottom="1819"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="1876" front-right="2260" front-bottom="2149"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="2207" front-right="2260" front-bottom="2481"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="2537" front-right="2260" front-bottom="2812"/>

<counter-section rows="2" columns="15"
front-left="144" front-top="2869" front-right="2260" front-bottom="3140"/>

</counter-sheet>

</game-box>
User avatar
Ichibrothers
211
Posts: 70
Joined: 15 Jul 2007, 16:27
Location: Rutland, MA

Post by Ichibrothers »

Not sure it matters, but the only thing I see different from any of my game-box.xml's is a space between the " and the />

resolution="300 dpi" />
back-bottom="2231" shadow="0" />


But, you said you have created many a gamebox, so I assume this is how it is in your other .xml files.
User avatar
Ichibrothers
211
Posts: 70
Joined: 15 Jul 2007, 16:27
Location: Rutland, MA

Post by Ichibrothers »

Posted over at the ZunTzu Consimworld forum. Maybe we can get some more guys over to have a look.
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Post by Uhlan »

Typically the error message cites line and character numbers when the problem is in the script; such as in line 40, position 14, etc etc
Maybe it's the file format of your images it's having trouble with?
User avatar
Ichibrothers
211
Posts: 70
Joined: 15 Jul 2007, 16:27
Location: Rutland, MA

Post by Ichibrothers »

Maybe it means the gamebox.xml is not saved in the correct file format. Not a sytax error, but a computer file format error?
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

A quick look suggests that your gamebox text is fine, can you post your scenario file?

Regards, Bill
PeteB
Posts: 13
Joined: 19 Nov 2016, 09:30
Location: UK

Post by PeteB »

Windows seems to recognise it as an XML fine

Here is the ZTS file

<?xml version="1.0" encoding="Windows-1252"?>
<game
game-box="ILF2"
scenario-name="All"
scenario-description="All"
scenario-copyright="TGC">
<layout board="ILF2 Map"/>
<layout board="ILF2 Counters"/>
<layout board="ILF2 Markers"/>

</game>
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

Hi Pete,

Try changing the scenario-name in your .zts file from "All" to "ILF2.zts".

Regards, Bill.
User avatar
Uhlan
Posts: 11
Joined: 08 Oct 2017, 20:57
Location: Maryland USA
Contact:

Post by Uhlan »

Try changing counters from board to tab:

<layout tab="Counters" />
Image
PeteB
Posts: 13
Joined: 19 Nov 2016, 09:30
Location: UK

Post by PeteB »

Thanks for the input guys, but neither of those worked

Genuinely stumped as to what the issue is!

P
User avatar
Ichibrothers
211
Posts: 70
Joined: 15 Jul 2007, 16:27
Location: Rutland, MA

Post by Ichibrothers »

Want to share the gamebox? Maybe it will work on a different machine....
Post Reply