Page 1 of 1

Problem with making a game box

Posted: 07 Oct 2010, 10:01
by Barbarzyciel
Hello!

I installed Sun Tzu because I realised that could be a great tool to make self published web games. I decided to make my own game from a scratch. I prepared it the way that is described in support. After launching a test game box (only with board and part of counters), info appeared:

"Error of type XmlException: Syntax for an XML
declaration is invalid. Line 1, Position 7."

My game box:

Code: Select all

<?xml encoding="windows-1252" ?>
<game-box
    name="Staadt"
    description="Game of medieval urban economy"
    copyright="Old Skull, Wojciech Bularz"
    startup-scenario="Opole.zts">


<map name="Opole" image-file="Staad plansza Zun Tzu.jpg" resolution="150 dpi" />
<counter-sheet name="Latyfundia"
front-image-file="Staad Zun Tzu latyfundia awers.jpg" front-resolution="150 dpi"
back-image-file="Staad Zun Tzu latyfundia rewers.jpg" back-resolution="150 dpi">
<counter-section rows="7" columns="4"
            front-left="1" front-top="1" front-right="1799" front-bottom="5249"
            back-left="1" back-top="1" back-right="1799" back-bottom="5249" />

</counter-sheet>


</game-box>

and my .zts file

Code: Select all

<?xml version="1.0" encoding="Windows-1252"?>
<game
    game-box="Staadt"
    scenario-name="Opole"
    scenario-description="--"
    scenario-copyright="Wojciech Bularz, Old Skull">
    <layout board="Miasto" />
    <layout board="Latyfundia" />
</game>

Thank you for any help.
If I missed any information, write - this is my first game box

Posted: 07 Oct 2010, 21:45
by Bill Barrett
I think your game-box.xml file's first line should be the same as your .zts file's first line:

<?xml version="1.0" encoding="Windows-1252"?>

Regards, Bill.

Posted: 09 Oct 2010, 19:08
by Barbarzyciel
Thank you for reply, but I'm afraid gamebox still don't work.

I started with this declaration:

Code: Select all

<?xml version="1.0" encoding="Windows-1252"?> 
but zun tzu shows an message:

"data at the root level is invalid. Line 1 Position 1"

I've found topic in which you adviced to avoid

Code: Select all

version="1.0"
in code. But in effect

"Error of type XmlException: Syntax for an XML
declaration is invalid. Line 1, Position 7."

is appeared.

I tried both ways, but none of them works. :(

Posted: 15 Oct 2010, 05:59
by Jerome
Barbarzyciel wrote:data at the root level is invalid. Line 1 Position 1
Hi! The error message indicates that the first character is wrong.
If you used WordPad then make sure you did save the file as Plain Text not Rich Text. Prefer Notepad to WordPad.
Check both files - game-box.xml and the scenario file.

Posted: 16 Oct 2010, 14:10
by Barbarzyciel
Simple and brilliant.

Thank you