Community » Forum » Feedback » Bug with withdrawing from bank after interest

cobalt
Pleb
If you deposit some money in a bank and it gains some interest, your balance on the bank's screen may look like you have $10.01 but if you try to withdraw that, it will error out saying that's more than what you deposited. You can withdraw $10 without any issues.

I think what's happening is a rounding error. Your deposit accumulates interest and there are more floating point digits on the backend we're not seeing.
Admin
Game Staff
It is indeed a rounding error. I have fixed so that future deposits should only grow by 2 decimals instead of 4.
Bill Rich
Pleb
It might be a better idea to use decimals instead of floats.
fryte
Pleb
or using floor() instead of round()