-
Notifications
You must be signed in to change notification settings - Fork 9
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
Bug on wavform #49
Comments
I knew about this when I did it, hence the comment right above that talking
about double and triple digits since what you're doing with 14+ battles
isn't normal. It's more complicated than your pseudo-code; that method by
itself can't work, I will likely use Regex to parse it out properly.
--
…On Sat, Mar 6, 2021 at 1:52 AM luca2125 ***@***.***> wrote:
Hi Mike,
There is a bug on wav form that crash if the mission or battle is > 9:
_frontend = _wave + "FrontEnd\\" + Path.GetFileNameWithoutExtension(_mission.MissionFileName).Substring(1).Remove(4) + "\\";
_battleNumber = int.Parse(Directory.GetParent(_frontend).Name.Substring(1, 1));
_missionNumber = int.Parse(Directory.GetParent(_frontend).Name.Substring(3, 1));
You work on fixed chars: Remove(4) and when you convert to int if the
mission is > 9 you get a letter and this cause exception.
So if you do something like this for example::
FileNoChars =
Path.GetFileNameWithoutExtension(_mission.MissionFileName).Replace("B", "
").Replace("M"," ");
_battleNumber =FileNoChars.Split(FileNoChars, " ")[1];
_missionNumber =FileNoChars.Split(FileNoChars, " ")[2];
This is only a pseudo code to explain the concept.
Hope this help.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#49>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHO5ESV73BK5J5SEQPI5GDTCHNLDANCNFSM4YWPCGTA>
.
|
MikeG621
added a commit
that referenced
this issue
Mar 6, 2021
Fixed in v1.9.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Mike,
There is a bug on wav form that crash if the mission or battle is > 9:
You work on fixed chars: Remove(4) and when you convert to int if the mission is > 9 you get a letter and this cause exception.
So if you do something like this for example::
This is only a pseudo code to explain the concept.
Hope this help.
The text was updated successfully, but these errors were encountered: