summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/tcp_game.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp
index 4f0202c60..64b7ba97a 100644
--- a/src/network/core/tcp_game.cpp
+++ b/src/network/core/tcp_game.cpp
@@ -18,6 +18,7 @@
#include "../network.h"
#include "../network_internal.h"
#include "../../debug.h"
+#include "../../error.h"
#include "table/strings.h"
@@ -46,8 +47,7 @@ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error)
if (!_network_server && _networking) {
_switch_mode = SM_MENU;
_networking = false;
- extern StringID _switch_mode_errorstr;
- _switch_mode_errorstr = STR_NETWORK_ERROR_LOSTCONNECTION;
+ ShowErrorMessage(STR_NETWORK_ERROR_LOSTCONNECTION, INVALID_STRING_ID, WL_CRITICAL);
return NETWORK_RECV_STATUS_CONN_LOST;
}