Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Money bug in Detailed performance rating window #6498

Closed
DorpsGek opened this issue Aug 14, 2016 · 3 comments
Closed

Money bug in Detailed performance rating window #6498

DorpsGek opened this issue Aug 14, 2016 · 3 comments

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Aug 14, 2016

Samu opened the ticket and wrote:

reported version is 1.6.1

I think I found a bug in "Detailed performance rating" window. The amount of money in the bank says £2,147 M, but on this savegame, NoNoCAB already has £3,2 M.

Attachments

Reported version: other
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/6498
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Aug 25, 2016

adf88 wrote:

"2,147 M" This number seems familiar ... 2^31 = 2 147 483 648
Looks like a bug, indeed.

//EDIT
I found it.
http://hg.openttd.org/trunk.hg/file/4051bab2730c/src/economy.cpp# l245
All scores are stored in 'int' variables.

So what's the decision? Turn into int64?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6498#comment14259
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Oct 3, 2016

Alberth wrote:

Attached the screenshot of the ratings window, to avoid having to download and run the game.

It shows "100%" on required amount of money, so the rating is displayed correctly, it's just the displayed user money amount that does not match with the real user amount.
However, both 2^31 and the real amount are above the required amount. Using either will work.

The data only seems to be used for the window (and is not stored somewhere, it seems), so it's probably fine to extend the size of the numbers.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6498#comment14282
@nielsmh

This comment has been minimized.

Copy link
Contributor

@nielsmh nielsmh commented Nov 1, 2018

Can confirm this is still present.

nielsmh added a commit to nielsmh/OpenTTD that referenced this issue Nov 1, 2018
@nielsmh nielsmh closed this in 810887a Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.