(svn r23780) -Fix [FS#4963] (r23764): also name the two new errors server-side. As extra, split up one of the errors in 3 errors, to be more specific what goes wrong. As cherry on top, make sure on all sides we can never again forget to add such entries on both sides, by introducing an assert_compile()

This commit is contained in:
truebrain
2012-01-09 21:22:48 +00:00
parent 64605a253e
commit 6c7c02eb14
5 changed files with 46 additions and 37 deletions

View File

@@ -315,8 +315,13 @@ StringID GetNetworkErrorMsg(NetworkErrorCode err)
STR_NETWORK_ERROR_CLIENT_KICKED,
STR_NETWORK_ERROR_CLIENT_CHEATER,
STR_NETWORK_ERROR_CLIENT_SERVER_FULL,
STR_NETWORK_ERROR_CLIENT_TOO_MANY_COMMANDS
STR_NETWORK_ERROR_CLIENT_TOO_MANY_COMMANDS,
STR_NETWORK_ERROR_CLIENT_TIMEOUT_PASSWORD,
STR_NETWORK_ERROR_CLIENT_TIMEOUT_COMPUTER,
STR_NETWORK_ERROR_CLIENT_TIMEOUT_MAP,
STR_NETWORK_ERROR_CLIENT_TIMEOUT_JOIN,
};
assert_compile(lengthof(network_error_strings) == NETWORK_ERROR_END);
if (err >= (ptrdiff_t)lengthof(network_error_strings)) err = NETWORK_ERROR_GENERAL;