Vice City: Multiplayer

VC:MP Discussion => Support => Bugs and Crashes => Topic started by: PunkNoodle on Jun 29, 2018, 05:46 AM

Title: [BUG] Money hud doesn't show values above 999 milions
Post by: PunkNoodle on Jun 29, 2018, 05:46 AM
Reproducible
Always

What you were doing when the bug happened
I tried setting 2,147,483,647 as cash and noticed the hud shows just 999,999,999, if however I were to set the same amount + 1 (and thus beyond the limit) it will shows all the figures including the minus. Despite the hud, getting the cash from the player showed the correct amount I've set.

What you think caused the bug
Perhaps default game behaviour, since it's unlikely anybody would ever reach such amount.
Title: Re: [BUG] Money hud doesn't show values above 999 milions
Post by: BeckzyBoi on Jun 29, 2018, 05:53 AM
You're welcome @PunkNoodle ;)
Title: Re: [BUG] Money hud doesn't show values above 999 milions
Post by: DizzasTeR on Jun 29, 2018, 06:33 AM
This is most likely an integer overflow issue
Title: Re: [BUG] Money hud doesn't show values above 999 milions
Post by: NicusorN5 on Jun 29, 2018, 08:17 AM
Quote from: Doom_Kill3R on Jun 29, 2018, 06:33 AMThis is most likely an integer overflow issue
No shit sherlock.

@PunkNoodle is damn right, that 'bug' is default game's behiavour. If i set the cash to the maximum's int32 value ( 0x7ffffff or 2147483647 ) the cash will be still positive. While the game shows that 999,999,999 value. An integer overflow is when i increase the maximum value with for example 1, it will get the minimum value + 1 (-2147483648 ).

Quote from: PunkNoodle on Jun 29, 2018, 05:46 AMit's unlikely anybody would ever reach such amount.
Pfft. In my own server , every admin has the maximum number of cash xD.