Jump to content
  • Advertisement
Sign in to follow this  

Highscores through XML

This topic is 2878 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 was following this tutorial to create a highscore list through xml for my xna game. But everytime I try to compile it will not work. Are there any easier tutorials out there for score lists? I don't need anything fancy, just something that works.

Hope someone can help me.

Nice site btw.

Share this post

Link to post
Share on other sites
I don't know of any alternate high-score tutorials, but maybe we can help you figure out what's wrong with the one you're using.

But everytime I try to compile it will not work.

I assume this means you're getting a compiler error? Could you tell us what the error is exactly, and maybe post some of your code so we can help troubleshoot it.

I didn't take a real close look at the tutorial, but it appears that it doesn't specify which class some of the functions should belong to (SaveHighScores and LoadHighScores, for example). Just a shot in the dark, but do all your functions belong to a class (or struct, or interface)? In C#, they must.

struct HighScoreData
static void SaveHighScores(HighScoreData data, int count) //<- This is okay.
{ /*Stuff*/ }

static HighScoreData LoadHighScores(string fileName) //<- This is not, this function does not belong to a class, struct, interface, etc...

Hope that helps.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!