Closed Samasaur1 closed 5 years ago
I believe it stops working at a one with 10 zeros after it (i.e. 10000000000
), but that a one with 9 zeros after it (i.e. 1000000000
) works. That's what my testing showed
In addition, the stack trace shows that it's a NumberFormatException
, while I am certain that my formatting was correct. Perhaps Integer.ParseInt
has a limit?
It turns out that my failed values were out of Integer
range. According to this SO post, I should use Long.parseLong()
instead. However, I can just put a cap on the maximum amount at a time
I think I'm just going to put a cap on it
Although this brings up a good question: Should there be discounts for buying in bulk?
Amounts in buying and selling still need to be redone
Should be done now
Describe the bug The game crashes when an amount is too large
To Reproduce Steps to reproduce the behavior:
buy food 1000000000000000
Expected behavior The game should tell me I can't afford it, that I can afford it, or that I couldn't but went into debt
Screenshots
Desktop (please complete the following information):
Stack trace
Additional context I don't know the size necessary, only that it is large