Jump to content



0

Question about Score


1 reply to this topic

#1 cvga OFFLINE  

cvga

    River Patroller

  • 2,596 posts
  • Location:Sector 36

Posted Sun Feb 3, 2008 9:54 PM

I was trying to debug some code so I modified my score routine to include score = score + 10000 every time a specific event happens so I could count how many times it was occuring. There's one specific situation where instead of adding 10,000 to the score, the score displays a score of 17. Since 10000 is binary for 17 I don't think this is a coincidence. Is there something about the score routine that I need to be aware of (like not adding more than 256 at a time)?.

Thanks!

#2 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Mon Feb 4, 2008 12:08 AM

View Postcvga, on Sun Feb 3, 2008 10:54 PM, said:

I was trying to debug some code so I modified my score routine to include score = score + 10000 every time a specific event happens so I could count how many times it was occuring. There's one specific situation where instead of adding 10,000 to the score, the score displays a score of 17. Since 10000 is binary for 17 I don't think this is a coincidence. Is there something about the score routine that I need to be aware of (like not adding more than 256 at a time)?.

Thanks!
You can add more than 255 (the largest value of a byte) to the score, so there's probably something else going on. It will be easier to help if you post your code.

Michael




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users