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

Auto-hire window auto completion bug #2547

Open
ezsnackeur opened this issue Mar 26, 2025 · 1 comment · May be fixed by #2555
Open

Auto-hire window auto completion bug #2547

ezsnackeur opened this issue Mar 26, 2025 · 1 comment · May be fixed by #2555

Comments

@ezsnackeur
Copy link
Contributor

ezsnackeur commented Mar 26, 2025

When opening the popup window to auto-hire its fields come precompiled with the comma notation every 3 digits starting from the right like seen in this screenshot (the number defaults to the current number of staff):
Image

but the system wont accept a comma in the number as reasonable input prompting this error message:
Image

@NovemberOrWhatever NovemberOrWhatever changed the title Auto-hire window auto compilation bug Auto-hire window auto completion bug Mar 26, 2025
@Clayell
Copy link
Contributor

Clayell commented Mar 31, 2025

Strangely, this bug only shows up with Final Count, and not with Reserve Funds. This might be because double.TryParse can handle commas, but int.TryParse can't? Anyway, the solution is to just replace any "," with "" before we call TryAddAutoHire.

There is another bug with the text later on, where it will always trigger the "reserve funds" error message, because b1 can't be true.

Relevant code:

bool b1 = int.TryParse(sNumStaff, out int numCrew);
bool b2 = double.TryParse(sReserveFunds, out double reserveFunds);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants