Error of type XmlException...???

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

Moderators: Ichibrothers, Cambronne

Post Reply
Amnese
Posts: 3
Joined: 29 Mar 2009, 05:34

Error of type XmlException...???

Post by Amnese »

I've tried to create my first game-box with a game I designed. When I try to load up in ZunTzu I get the following error message:

Code: Select all

Error of type XmlException: Data at the root level is invalid: Line 1, position 1.
I've tried a whole range of changes, and could get it to work with just the map. But when I add the counters I get the same error message.

Here is my game-box.xml file (Lujo.ztg):

Code: Select all

<?xml version="1.0" encoding="windows-1252"?>
<game-box version="1.0"
	name="Lujo"
	description="China Village"
	copyright="None"
	startup-scenario="startup.zts"
	icon="icon.bmp">
	<map name="Carte" image-file="Carte.jpg" resolution="300 dpi" />
	<counter-sheet name="Resources"
		front-image-file="ResourceCards.jpg" front-resolution="150 dpi">
		<counter-section rows="4" columns="5"
			front-left="0" front-top="0" front-right="812" front-bottom="1032" />
		</counter-sheet>
</game-box>


And here is the scenario file (startup.zts):

Code: Select all

<?xml version="1.0" encoding="Windows-1252"?>
<game
	game-box="Lujo"
	scenario-name="Startup"
	scenario-description="Basic"
	scenario-copyright="None">
	<layout board="Carte" />
</game>
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

Error of type XmlException: Data at the root level is invalid: Line 1, position 1.
I don't know why you're getting that error messsage because your code works...

BUT You don't need this line:

Code: Select all

game-box version="1.0" 
Nor this:

Code: Select all

icon="icon.bmp"
And in your startup.zts scenario file you need to insert this line:

Code: Select all

<layout board="Resources" />
between <layout board="Carte" /> and </game>

Hope that helps.

Regards, Bill
Amnese
Posts: 3
Joined: 29 Mar 2009, 05:34

Post by Amnese »

Thanks, I tried that but still no luck. A bit frustrating and disappointing not to get it working.
Amnese
Posts: 3
Joined: 29 Mar 2009, 05:34

Post by Amnese »

Finally got it working...I'm an idiot...I won't say what I was doing wrong - too embarrassing :oops: . Thanks for the help anyway.
John Anderson
Posts: 9
Joined: 01 May 2009, 09:30
Location: London, UK

Post by John Anderson »

No, please say what it was. I'm having exactly the same difficulty.
John
Amnese wrote:Finally got it working...I'm an idiot...I won't say what I was doing wrong - too embarrassing :oops: . Thanks for the help anyway.
John Anderson
Posts: 9
Joined: 01 May 2009, 09:30
Location: London, UK

Post by John Anderson »

Cracked it due to...
Jerome wrote:...Ted, there's a display option in Windows Explorer to hide known file extensions. Uncheck it.
This is causing a lot of confusion. I'm pretty sure your "TS.ztb" file is actually named "TS.ztb.zip".
:)
John
t worthington
Posts: 5
Joined: 19 May 2009, 21:39

Post by t worthington »

I found two things, first the file needs to be a .ztb, second if you are using winace you need to go to options and create in .zip format.
Post Reply