Jump to content
  • Advertisement
Sign in to follow this  
EmpireProductions

TinyXML question

This topic is 3374 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!