Sign in to follow this  
EmpireProductions

TinyXML question

Recommended Posts

I am making a procedural Galaxy Engine for a game I am working on. I am going to be loading the information for each solar system through XML documents and I am using TinyXML. I am trying to get TinyXML setup and i was wondering if any one had any error checking code or could tell me what I would need so I can make sure it is loading the XML documents correctly? My code so far: #include "XMLParser.h" void XMLParser::LoadXML(const char* filetoload) { TiXmlDocument doc(filetoload); bool loadOkay = doc.LoadFile(); if (loadOkay) { } else { } } I know that the error checking code would go in the else statement but I have no clue what to put there.

Share this post


Link to post
Share on other sites
Well, what do you want to happen when there's an error? Print an error message? Exit the program? Try loading some "place-holder" file instead so the game can continue somewhat? Something else?

The answer, really, is "do whatever you have to do."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this