Thread: Problems with displaying highscore (snprintf)

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    2

    Problems with displaying highscore (snprintf)

    Hello everyone, new guy here.
    I've got a small game with a highscore list, but it fails to show the highscore on screen everytime the game ends...
    Is there anyone here who can point out obvious mistakes/errors?
    All i get from cmd when i'm compiling is some "warnings".

    The code was written on Eclipse and compiled using Cygwin and cmd.exe

    See file below.

    http://dump.no/files/f39cbc8d0e0e/raiden.zip

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    because you never call teh code to display teh high score after PlayGame() returns...

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    2
    Quote Originally Posted by abachler View Post
    because you never call teh code to display teh high score after PlayGame() returns...
    Well, to be honest, i don't know how to do that.
    If anything, could i have a hint on how to get the score results displayed between "endgame" and "playgame" ?

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You mean you have written tens of kilobytes of code without knowing how to call a function?

    Actually, having looked at your project, I can believe that, because your code is pretty much one single large function - it should definitely not be that large. It should be split into smaller functions. So that would be a good learning experience.

    Oh, and by the way, you should fix warnings too!

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  3. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  4. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  5. Problems displaying content of a text file
    By melissa in forum C++ Programming
    Replies: 5
    Last Post: 11-12-2001, 06:13 PM

Tags for this Thread