Page 1 of 1

Score

PostPosted: Thu Oct 20, 2005 6:32 pm
by SanDiego1
I have a game where the player gets points for getting a question correct and loses points when the player gets the question wrong. If the player gets a question wrong at the very beginning of the game and loses 100 points, the score shows -99 (I know that is because the first number is a 0). Is there a way to fix this? Many thanks!

PostPosted: Thu Oct 20, 2005 7:16 pm
by makslane
Try this:

score -= 100;

if(score < 0) score = 0;

PostPosted: Thu Oct 20, 2005 7:53 pm
by SanDiego1
Thank you, Makslane.