Page 1 of 2

Odd error message

Posted: 26 Sep 2017, 19:27
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

Yep - get this one too!

Posted: 30 Sep 2017, 13:50
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

Posted: 04 Oct 2017, 19:27
by PeteB
Thanks

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

P

Posted: 06 Oct 2017, 01:18
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.

Posted: 07 Oct 2017, 19:25
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>

Posted: 08 Oct 2017, 14:41
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.

Posted: 08 Oct 2017, 14:53
by Ichibrothers
Posted over at the ZunTzu Consimworld forum. Maybe we can get some more guys over to have a look.

Posted: 08 Oct 2017, 21:00
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?

Posted: 08 Oct 2017, 23:21
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?

Posted: 09 Oct 2017, 23:47
by Bill Barrett
A quick look suggests that your gamebox text is fine, can you post your scenario file?

Regards, Bill

Posted: 11 Oct 2017, 21:42
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>

Posted: 11 Oct 2017, 23:07
by Bill Barrett
Hi Pete,

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

Regards, Bill.

Posted: 12 Oct 2017, 05:58
by Uhlan
Try changing counters from board to tab:

<layout tab="Counters" />

Posted: 12 Oct 2017, 20:55
by PeteB
Thanks for the input guys, but neither of those worked

Genuinely stumped as to what the issue is!

P

Posted: 12 Oct 2017, 21:38
by Ichibrothers
Want to share the gamebox? Maybe it will work on a different machine....