The Ghosts of XML past

Discuss maps, trains and other modding topics
User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Thu Apr 12, 2007 5:29 am

I have had strange CTDs when I've been testing out mods and a couple of times the only thing I did to fix the problem was open the XMLs in Notepad++ and use the Pretty Print XML tool. This reformats the file and cleared up my CTD. I think the XML parser in Railroads is a little finicky when it comes to XML code.

User avatar
CeeBee51
Posts: 141
Joined: Sun Dec 17, 2006 9:58 pm
Location: Chase BC Canada
Contact:

Post by CeeBee51 » Thu Apr 12, 2007 11:57 am

I was wondering if extra spaces, extra lines(empty) or some other such finicky thing could be the cause. Last night I went through the xml's and tried to clean them up. Didn't have time to test the map but will today.
Warll.... only one HD and formatting a hd drive is not something I've done or want to do :roll:
Lowell..... Map is in my UserMaps folder. At this point I have not installed the Santa map and don't even have a scenerio folder.
Dr Frag.... I'll try the pretty print tool and see if it helps.
Thanks for all your ideas and suggestions.

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Thu Apr 12, 2007 2:47 pm

Dr Frag - it will be interesting to see if that is the problem. I format any XML I open when I'm looking into a map, and usually format all of the XML even if I only want to examine 1.

CeeBee51 - to the thread for this map......under goods in the RAR and ZIP downloads, the RARs RRT_Goods XML has Paper, the ZIP RRT_Goods XML doesn't. The Installer does have Paper in the RRT_Goods XML. That is the order they are in the thread. Try moving what you have and loading the Installer version if you can. Of course you could just check your RRT_Goods to see if you are allowing Paper to be used......
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
CeeBee51
Posts: 141
Joined: Sun Dec 17, 2006 9:58 pm
Location: Chase BC Canada
Contact:

Post by CeeBee51 » Fri Apr 13, 2007 12:18 am

Snoopy, my xml had paper and the cars and industry for it.
I didn't have much time before work this morning but I tried Dr Frag's suggestion and used pretty print on all the xmls and the game loaded and ran for a few minutes but by then I had run out of time and couldn't keep playing. I will have more info shortly as I'm almost finished dinner and will give it a go. CeeBee.... over and out :D

User avatar
CeeBee51
Posts: 141
Joined: Sun Dec 17, 2006 9:58 pm
Location: Chase BC Canada
Contact:

Post by CeeBee51 » Fri Apr 13, 2007 11:53 am

Well, I played for well over an hour with no CTD's at all. Now my question is how the heck the xml's got messed up as I hadn't played that map or touched the xml's in the time between when it worked and when it stopped working.
Anyway, if spaces, empty lines and such cause major problems, and using the pretty print tool fixes them maybe it belongs in the wiki? I don't have a clue how to put it there but maybe some soul smarter than I could do it?

choobacca
Posts: 190
Joined: Wed Jan 24, 2007 7:46 pm

Post by choobacca » Fri Apr 13, 2007 3:44 pm

Spacing outside of XML tags doesn't matter, but spacing inside does.

<Train>
<szName>
(spaces matter here)</szName>
(spaces don't matter here)

</Train>


Also, it is easy to accidentally make changes without knowing it. One time I had accidentally hit a key on the keyboard while viewing an XML file, and it added an "e". This caused the XML to be invalid and crashed the game. It took me a while to find this as I knew I didn't (intentionally) make any changes to the file.

Post Reply