From e572878597eed097eebe44e9259b2fea78cb3022 Mon Sep 17 00:00:00 2001 From: Fallstar Date: Sun, 25 May 2014 12:21:51 +0000 Subject: Message when port not specified, but only lasts a few ms. 'll maybe fix that someday, but it avoid crash when port is not specified. --- Gamestates/Multiplayer/Local.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gamestates/Multiplayer/Local.lua b/Gamestates/Multiplayer/Local.lua index 7158866..c867464 100644 --- a/Gamestates/Multiplayer/Local.lua +++ b/Gamestates/Multiplayer/Local.lua @@ -99,7 +99,11 @@ function Local:update(dt) Gui.Label{text = "Host", size = {Utils.percentCoordinates(10, 10)}} Gui.Input{info = Local.server_host, size = {Utils.percentCoordinates(50, 10)}} if Gui.Button{text = "Connect", size = {Utils.percentCoordinates(60, 10)}} then - connect = true + if string.find(Local.server_host.text, ":") then + connect = true + else + Gui.Label{text = "Please enter port"} + end end -- End -- cgit v1.2.3-54-g00ecf