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

Command error (maybe a code bug?) 0.1.5.2 #778

Open
Snipe76 opened this issue May 18, 2014 · 1 comment
Open

Command error (maybe a code bug?) 0.1.5.2 #778

Snipe76 opened this issue May 18, 2014 · 1 comment

Comments

@Snipe76
Copy link

Snipe76 commented May 18, 2014

[04:10:10] [Info] : Command Input: /dekessler 0.1
[04:10:10] [Error] : Error handling server command. Maybe a typo? Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Convert.ToInt32(String value)
at KMPServer.Server.dekesslerServerCommand(String[] parts)
at KMPServer.Server.processCommand(String input)

I know there is no time like 0.1 minutes, but that might help polish the code a bit...
version 0.1.5.2 (dev)

@Pezmc
Copy link

Pezmc commented May 21, 2014

By the looks of it this is caused on line 1284 (minsToKeep = Convert.ToInt32(args[0]);) which is then mutlipled by 60 and parsed as a double on 1292 (Convert.ToDouble(minsToKeep * 60);)

There's no reason that 1284 couldn't parse a double.
See https://github.com/TehGimp/KerbalMultiPlayer/blob/master/KMPServer/Server.cs#L1284

Pezmc added a commit to Pezmc/KerbalMultiPlayer that referenced this issue May 21, 2014
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