Page 1 of 1

Invalid Object Reference

Posted: 13 Jun 2012, 12:11
by lclaudius
I'm creating a Pax Britannica gamebox. Several counters are triangular and two-faced, so I need a mask for the front image and one for the back image. I have tried adding the following to the game-box.xml file:

Code: Select all

	<counter-sheet name="Units" 
                front-image-file="units-front.png"
                front-mask-file="mask-units-front.png">
                back-image-file="units-back.png"
                back-mask-file="mask-units-back.png">

		<counter-section columns="1" rows="1" 
		front-left="49" front-top="52" front-right="109" front-bottom="111" 
		back-left="349" back-top="65" back-right="410" back-bottom="125"
		supply="32" />

	</counter-sheet>
However, I get a fatal error "Object reference not set to an instance of an object" when I try to load. Can someone help me spot the error?

The gamebox can be downloaded from http://dl.dropbox.com/u/25031709/Pax%20Britannica.ztb

Posted: 13 Jun 2012, 18:01
by Bill Barrett
Hi Iclaudius,

You should try adding the gamebox to the library (from the Menu) - this will give you a list of all the errors and help you figure out what's wrong.

However, I've already done that and fixed them - just cut and paste this into notepad and save it:


<?xml version="1.0" encoding="windows-1252" ?>
<game-box
name="Pax Britannica"
description="The Colonial Era --- 1880 to the Great War"
copyright="Victory Games"
startup-scenario="Base.zts">

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

<dice-hand type="D6">
<dice count="1" color="ffffff" pips="000000" />
</dice-hand>

<dice-hand type="D6">
<dice count="2" color="ffffff" pips="000000" />
</dice-hand>

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

<counter-section
front-left="0" front-top="0" front-right="59" front-bottom="60" supply="10"/>

<counter-section
front-left="59" front-top="0" front-right="118" front-bottom="60" supply="20"/>

<counter-section
front-left="118" front-top="0" front-right="177" front-bottom="60" supply="20"/>

<counter-section
front-left="177" front-top="0" front-right="236" front-bottom="60" supply="2"/>

<counter-section
front-left="236" front-top="0" front-right="295" front-bottom="60" />

<counter-section
front-left="295" front-top="0" front-right="354" front-bottom="60" />

<counter-section
front-left="354" front-top="0" front-right="413" front-bottom="60" />

<counter-section
front-left="413" front-top="0" front-right="472" front-bottom="60" />

<counter-section
front-left="472" front-top="0" front-right="531" front-bottom="60" />

<counter-section
front-left="531" front-top="0" front-right="590" front-bottom="60" />

<counter-section
front-left="590" front-top="0" front-right="649" front-bottom="60" />

<counter-section
front-left="649" front-top="0" front-right="709" front-bottom="60" />

</counter-sheet>

<counter-sheet name="Units"
front-image-file="units-front.png" front-resolution="300 dpi"
front-mask-file="mask-units-front.png"
back-image-file="units-back.png" back-resolution="300 dpi"
back-mask-file="mask-units-back.png">

<counter-section
front-left="49" front-top="52" front-right="109" front-bottom="111"
back-left="349" back-top="65" back-right="410" back-bottom="125"
supply="32" />

</counter-sheet>

</game-box>

Posted: 13 Jun 2012, 20:36
by lclaudius
Bill Barrett wrote:Hi Iclaudius,

You should try adding the gamebox to the library (from the Menu) - this will give you a list of all the errors and help you figure out what's wrong.
Good idea, I'll use this method in the future. Thanks for the tip!
However, I've already done that and fixed them - just cut and paste this into notepad and save it:
Thanks again, Bill, I'm indebted to you.