View Single Post
Old 03-23-2003, 07:50 PM   #6
MJohnson
Major Leagues
 
MJohnson's Avatar
 
Join Date: Dec 2001
Location: under an overpass
Posts: 459
It is a very difficult problem to fix because it would involve a complete overhaul of the game.

This may not be the best explanation of it, but let me try:
Earned Runs are saved as 1 byte (or 8 bits). The largest number allowed in an unsigned integer is 255 or in binary 1111 1111. When a pitcher gives up his 256th run, his earned runs become

1 0000 0000

Since only 8 bits are saved, he gets credited with having given up 0000 0000, or 0 runs.

To avoid this, earned runs must be saved as 2 bytes, then a pitcher could in theory give up 65,535 runs before an error.

This would not occupy much more memory, 1 byte per player, or one character in the players name. The big problem in changing this occurs in the code of the game because each time a reference to a players earned runs occur, the reference must be changed from 1 byte (unsigned char) to 2 bytes (unsigned int).

This could be very cumbersome and probably cause many problems but it is something I would like to see changed.
MJohnson is offline   Reply With Quote