{"action":"created","issue":{"url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/14","labels_url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/14/comments","events_url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/14/events","html_url":"https://github.com/jpcsupplies/Economy_mod/issues/14","id":104910262,"number":14,"title":"BUG! pay command crashes game if only 1 parameter used","user":{"login":"jpcsupplies","id":13939039,"avatar_url":"https://avatars.githubusercontent.com/u/13939039?v=3","gravatar_id":"","url":"https://api.github.com/users/jpcsupplies","html_url":"https://github.com/jpcsupplies","followers_url":"https://api.github.com/users/jpcsupplies/followers","following_url":"https://api.github.com/users/jpcsupplies/following{/other_user}","gists_url":"https://api.github.com/users/jpcsupplies/gists{/gist_id}","starred_url":"https://api.github.com/users/jpcsupplies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpcsupplies/subscriptions","organizations_url":"https://api.github.com/users/jpcsupplies/orgs","repos_url":"https://api.github.com/users/jpcsupplies/repos","events_url":"https://api.github.com/users/jpcsupplies/events{/privacy}","received_events_url":"https://api.github.com/users/jpcsupplies/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jpcsupplies/Economy_mod/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-04T15:16:13Z","updated_at":"2015-09-06T00:42:53Z","closed_at":null,"body":"Started working on the pay command,  have a test bank file entry for \"bob\"\r\n/pay  =  refer to help error\r\n/pay nobody 10 = unable to find user\r\n/pay bob 10 = debug message \r\n/pay bob 1000 = cant afford that debug message\r\n\r\nBUT \r\n/pay fred\r\nseems to crash game with an array error (eh!?)\r\n\r\ntoo tired to fix now, nearly face planted the keyboard\r\n but the \"else\" on the \"if (split.Length >= 2)\" which should respond \" invalid number of parameters\" seems to fail to trigger is best guess.. or somehow its trying to access [2] in array somehow but cant see how.\r\nlazy fix might be to assign nul as 0 then it treats it like they did /pay fred 0  which should respond with a unknown person error\r\n\r\nto someone with a good nights sleep should be something obvious.. im off to bed\r\nhere is the error message\r\n\r\n2015-09-05 00:49:43.190 - Thread:   1 ->  Exception occured: System.IndexOutOfRangeException: Index was outside the bounds of the array.\r\n   at Economy.EconomyScript.processMessage(String messageText)\r\n   at Economy.EconomyScript.gotMessage(String messageText, Boolean& sendToOthers)\r\n   at Sandbox.Game.Gui.MyGuiScreenChat.HandleInput(Boolean receivedFocusInThisUpdate)\r\n   at Sandbox.Graphics.GUI.MyScreenManager.HandleInput()\r\n   at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput()\r\n   at Sandbox.MySandboxGame.Update()\r\n   at Sandbox.Engine.Platform.Game.UpdateInternal()\r\n   at Sandbox.Engine.Platform.FixedRenderLoop.<>c__DisplayClass2.<Run>b__1()\r\n   at Sandbox.Engine.Platform.GenericRenderLoop.Run(VoidAction tickCallback)\r\n   at Sandbox.Engine.Platform.FixedRenderLoop.Run(VoidAction tickCallback)\r\n   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)\r\n   at SpaceEngineers.MyProgram.RunInternal(String[] args)\r\n   at SpaceEngineers.MyProgram.Main(String[] args)\r\n2015-09-05 00:49:43.192 - Thread:   1 ->  Hiding window\r\n2015-09-05 00:49:43.607 - Thread:   1 ->  Hiding window done\r\n2015-09-05 00:49:43.607 - Thread:   1 ->  Showing message"},"comment":{"url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/comments/138015421","html_url":"https://github.com/jpcsupplies/Economy_mod/issues/14#issuecomment-138015421","issue_url":"https://api.github.com/repos/jpcsupplies/Economy_mod/issues/14","id":138015421,"user":{"login":"SaltPepp","id":6860291,"avatar_url":"https://avatars.githubusercontent.com/u/6860291?v=3","gravatar_id":"","url":"https://api.github.com/users/SaltPepp","html_url":"https://github.com/SaltPepp","followers_url":"https://api.github.com/users/SaltPepp/followers","following_url":"https://api.github.com/users/SaltPepp/following{/other_user}","gists_url":"https://api.github.com/users/SaltPepp/gists{/gist_id}","starred_url":"https://api.github.com/users/SaltPepp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaltPepp/subscriptions","organizations_url":"https://api.github.com/users/SaltPepp/orgs","repos_url":"https://api.github.com/users/SaltPepp/repos","events_url":"https://api.github.com/users/SaltPepp/events{/privacy}","received_events_url":"https://api.github.com/users/SaltPepp/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T00:42:53Z","updated_at":"2015-09-06T00:42:53Z","body":"Isn't possible to check to see if the second parameter is a int or double, if it is not then combine split[1] and split[2] together to form the player name and use split[3] as the amount."}}