[MAP] Some sort of Validity error

Post here if you need help setting up your server, etc.
Post Reply
7Priest7
On Lightcycle Grid
Posts: 14
Joined: Sat Dec 11, 2010 5:26 pm

[MAP] Some sort of Validity error

Post by 7Priest7 »

Below is the error --V

Code: Select all

C:\Program Files (x86)\Armagetron Advanced Dedicated>armagetronad_dedicated.exe
 1>\Users\Alexander\Documents\UniServer\www\log.txt
:170: element Field: validity error : Element Field content does not follow the
DTD, expecting (Axes? , (Spawn | Wall | Zone)*), got (Axes Spawn Spawn Spawn Spa
wn Wall CDATA CDATA Wall Wall Wall Wall Wall Wall Wall Wall Wall Wall Wall Wall
Wall Wall Wall Wall Wall Wall Wall Wall Wall Wall Wall CDATA )
                        </Field>
                                ^
The map file is like this

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE Resource SYSTEM "map-0.2.8_beta3.dtd">
<Resource type="aamap" name="cross" version="0.3" author="7priest7" category="cross">
	<Map version="0.2.8">
		<!-- A Cross Shaped Map EDIT: BIGGER -->

		<World>
			<Field>
				<Axes number="4" />

				<Spawn	x="300"	y="100"	xdir="0" ydir="1"	/>
				<Spawn	x="100"	y="300"	xdir="1" ydir="0"	/>
				<Spawn	x="500"	y="300"	xdir="-1" ydir="-0"	/>
				<Spawn	x="300"	y="700"	xdir="-0" ydir="-1"	/>

				<Wall height="2">
				<!-- Many Point x ys like <Point	x="200"	y="0"	/> and many more walls -->
				</Wall>
			</Field>
		</World>
	</Map>
</Resource>
I have no idea why it is doing it...

Thanks in advance for any effort made to assist me...
Alex
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: [MAP] Some sort of Validity error

Post by Z-Man »

According to the error report, you have CDATA littered between your 'many Walls'. Which, since you probably didn't add real CDATA (as it wouldn't make sense), means you have illegal XML in those positions.
7Priest7
On Lightcycle Grid
Posts: 14
Joined: Sat Dec 11, 2010 5:26 pm

Re: [MAP] Some sort of Validity error

Post by 7Priest7 »

Thanks Z-Man
Z-Man wrote:According to the error report, you have CDATA littered between your 'many Walls'. Which, since you probably didn't add real CDATA (as it wouldn't make sense), means you have illegal XML in those positions.
Hmm I really have little idea what CDATA means... (character data maybe?)

Since I don't see any problems with walls I am wondering if it is the PHP Backslash expressions I have...

Code: Select all

   $ws = "\t\t\t\t<Wall height=\"2\">\r\n";
   $we = "\t\t\t\t</Wall>\r\n";
   $ps = "\t\t\t\t\t<Point\t";
   $pe = " />\r\n";
   $pm = $pe.$ps;
There are more backslash expressions...

Thanks in advance to anybody who is able to assist me further <3

P.S.
Here is wall code in case I overlooked something

Code: Select all


				<Wall height="2">
					<Point	x="200"	y="0"	/>
					<Point	x="400"	y="0"	/>
					<Point	x="400"	y="200" />
					<Point	x="600"	y="200" />
					<Point	x="600"	y="400" />
					<Point	x="400"	y="400" />
					<Point	x="400"	y="800" />
					<Point	x="200"	y="800" />
					<Point	x="200"	y="400" />
					<Point	x="0"		y="400" />
					<Point	x="0"		y="200" />
					<Point	x="200" 	y="200" />
					<Point	x="200" 	y="0" />
				</Wall>
				<Wall height="2">
					<Point	x="30"	y="380"  />
					<Point	x="20"	y="380"  />
					<Point	x="20"	y="390"  />
					<Point	x="30"	y="390"  />
					<Point	x="30"	y="385"  />
					<Point	x="27"	y="385"  />
				</Wall>
				<Wall height="2">
					<Point	x="32"	y="380"  />
					<Point	x="32"	y="390"  />
					<Point	x="42"	y="390"  />
					<Point	x="42"	y="380"  />
					<Point	x="32"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="44"	y="380"  />
					<Point	x="44"	y="390"  />
					<Point	x="51"	y="390"  />
					<Point	x="54"	y="387"  />
					<Point	x="54"	y="384"  />
					<Point	x="51"	y="380"  />
					<Point	x="44"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="68"	y="380"  />
					<Point	x="68"	y="390"  />
					<Point	x="75"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="80"	y="380"  />
					<Point	x="80"	y="390"  />
					<Point	x="90"	y="390"  />
					<Point	x="90"	y="380"  />
					<Point	x="80"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="92"	y="380"  />
					<Point	x="97"	y="390"  />
					<Point	x="102"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="114"	y="380"  />
					<Point	x="104"	y="380"  />
					<Point	x="104"	y="390"  />
					<Point	x="114"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="105"	y="384"  />
					<Point	x="111"	y="384"  />
				</Wall>
				<Wall height="2">
					<Point	x="126"	y="380"  />
					<Point	x="116"	y="380"  />
					<Point	x="116"	y="385"  />
					<Point	x="126"	y="385"  />
					<Point	x="126"	y="390"  />
					<Point	x="116"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="140"	y="390"  />
					<Point	x="140"	y="380"  />
					<Point	x="150"	y="380"  />
					<Point	x="150"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="141"	y="383"  />
					<Point	x="149"	y="383"  />
				</Wall>
				<Wall height="2">
					<Point	x="152"	y="380"  />
					<Point	x="152"	y="390"  />
					<Point	x="159"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="174"	y="380"  />
					<Point	x="164"	y="380"  />
					<Point	x="164"	y="390"  />
					<Point	x="174"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="165"	y="384"  />
					<Point	x="171"	y="384"  />
				</Wall>
				<Wall height="2">
					<Point	x="176"	y="380"  />
					<Point	x="180"	y="384"  />
				</Wall>
				<Wall height="2">
					<Point	x="186"	y="380"  />
					<Point	x="176"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="182"	y="386"  />
					<Point	x="186"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="188"	y="390"  />
					<Point	x="188"	y="380"  />
					<Point	x="198"	y="380"  />
					<Point	x="198"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="189"	y="383"  />
					<Point	x="197"	y="383"  />
				</Wall>
				<Wall height="2">
					<Point	x="200"	y="390"  />
					<Point	x="200"	y="380"  />
					<Point	x="210"	y="390"  />
					<Point	x="210"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="212"	y="380"  />
					<Point	x="212"	y="390"  />
					<Point	x="219"	y="390"  />
					<Point	x="222"	y="387"  />
					<Point	x="222"	y="384"  />
					<Point	x="219"	y="380"  />
					<Point	x="212"	y="380"  />
				</Wall>
				<Wall height="2">
					<Point	x="234"	y="380"  />
					<Point	x="224"	y="380"  />
					<Point	x="224"	y="390"  />
					<Point	x="234"	y="390"  />
				</Wall>
				<Wall height="2">
					<Point	x="225"	y="384"  />
					<Point	x="231"	y="384"  />
				</Wall>
				<Wall height="2">
					<Point	x="236"	y="390"  />
					<Point	x="236"	y="380"  />
					<Point	x="246"	y="384"  />
					<Point	x="236"	y="384"  />
					<Point	x="246"	y="390"  />
				</Wall>
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: [MAP] Some sort of Validity error

Post by Z-Man »

Yeah, CDATA stands for 'character data'. When used intentionally, it's a way to get otherwise illegal texts into XML. However, libxml uses CDATA in parser error messages to denote random junk, like any text between tags.

When I copy that into the body from earlier, I get no errors and a working map. Which is odd. The php looks fine; I wouldn't use \r and \t at all (and you should try without them), but they're legal whitespace and should get ignored completely.
7Priest7
On Lightcycle Grid
Posts: 14
Joined: Sat Dec 11, 2010 5:26 pm

Re: [MAP] Some sort of Validity error

Post by 7Priest7 »

Z-Man wrote:Yeah, CDATA stands for 'character data'. When used intentionally, it's a way to get otherwise illegal texts into XML. However, libxml uses CDATA in parser error messages to denote random junk, like any text between tags.

When I copy that into the body from earlier, I get no errors and a working map. Which is odd. The php looks fine; I wouldn't use \r and \t at all (and you should try without them), but they're legal whitespace and should get ignored completely.
Perhaps it is a previously un-noticed parser error specific to Windows Dedicated Server?
From what I see I am one of the only ones who uses Windows for my "Dedicated" Server... (Not actually Dedicated simply a laptop(with dual [email protected] and 4GB Ram) I leave on that runs other servers)

I use \r\n because while Linux Platforms place only \n in code... I use Windows... and I am Shallow Enough to want all my line breaks to look the same to anyone who knows how to view them...
I use \t purely for easier reading of the map file...

Well Thanks...
I guess This topic is over now...
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: [MAP] Some sort of Validity error

Post by Z-Man »

Well, I guess if you attach (not inline-quote) the map and possibly the script, any format errors would survive that. Or, attach the script. I don't think there can be special Windows parser errors, it's the same cross-platform library we're using.
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Re: [MAP] Some sort of Validity error

Post by Luke-Jr »

Probably because your wall has no points...
Post Reply