2,147,483,647 is the maximum integer in 32-bit. Any value higher than this can cause issues or present itself as an error. In the case of the game, it will appear as a negative number. Spending Coins...