DayZ 1.24
Loading...
Searching...
No Matches
ConnectErrorClientModule.c
Go to the documentation of this file.
2{
3 UNKNOWN = -1, // -1 must always be UNKNOWN
4 OK = 0, // 0 must always be OK
5
6 SERVER_UNREACHABLE, // Could not connect to server because it is not reachable (offline, restarting, ..)
7 ALREADY_CONNECTING, // Client is already attempting to join a server
8 ERROR_MSG_SHOWED, // Indicates there is an error on screen that has yet to be confirmed
9 INCORRECT_CLIENT_STATE, // The client is already connected or is connecting to a server
10 INVALID_SESSION, // The guid of the session is empty
11
12 VERSION_MISMATCH, // Mismatch between server and client version
13 VERSION_MISMATCH_RB, // Client build is lower than "requiredBuild" (server config)
14 VERSION_MISMATCH_AB, // Client build is higher than "allowedBuild" (server config)
15
16 DLC_CHECK_FAILED, // Client does not have required DLC
17 EMPTY_PASSWORD, // Player input an empty password
18
19 PASSWORD, // Server is password protected
20 BE_LICENCE, // Server is using BE and it has not yet been agreed to
21};
22
23class ConnectErrorClientModule : ErrorHandlerModuleScript
24{
26 {
27 SetCategory(ErrorCategory.ConnectErrorClient);
28 }
29
30 override void InitOptionalVariables()
31 {
32 super.InitOptionalVariables();
33
34 m_Header = "#server_browser_connecting_failed";
35 }
36
37 override void FillErrorDataMap()
38 {
39 super.FillErrorDataMap();
40
41 InsertDialogueErrorProperties(EConnectErrorClient.SERVER_UNREACHABLE, "#STR_server_unreachable");
42 InsertDialogueErrorProperties(EConnectErrorClient.ALREADY_CONNECTING, "#STR_already_connecting");
43 InsertDialogueErrorProperties(EConnectErrorClient.ERROR_MSG_SHOWED, "#STR_error_msg_showed");
44 InsertDialogueErrorProperties(EConnectErrorClient.INCORRECT_CLIENT_STATE, "#STR_incorrect_client_state");
45 InsertDialogueErrorProperties(EConnectErrorClient.INVALID_SESSION, "#STR_invalid_session");
46
47 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH, "#multi_server_not_compatible_message");
48 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH_RB, "#multi_server_not_compatible_message");
49 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH_AB, "#multi_server_not_compatible_message");
50
51 InsertDialogueErrorProperties(EConnectErrorClient.DLC_CHECK_FAILED, "#mod_detail_info_warning");
52 InsertDialogueErrorProperties(EConnectErrorClient.EMPTY_PASSWORD, "#STR_empty_password");
53
56 }
57
58#ifndef NO_GUI
60 {
61 switch (eventTypeId)
62 {
64 g_Game.GetUIManager().CloseSpecificDialog(m_LastErrorThrown);
65 break;
66
67 default:
68 break;
69 }
70 }
71#endif
72}
73
74/*class ConnectErrorClientModuleUI : UIScriptedMenu
75 {
76 override bool OnModalResult(Widget w, int x, int y, int code, int result)
77 {
78 super.OnModalResult(w, x, y, code, result);
79
80 int error = ErrorModuleHandler.GetCodeFromError(code);
81 switch ( error )
82 {
83 default:
84 break;
85 }
86
87 return true;
88 }
89 }*/
@ ALREADY_CONNECTING
@ VERSION_MISMATCH_AB
@ INCORRECT_CLIENT_STATE
@ SERVER_UNREACHABLE
@ VERSION_MISMATCH_RB
DayZGame g_Game
Definition DayZGame.c:3528
class ErrorHandlerModule m_Header
This is where to input logic and extend functionality of ErrorHandlerModule.
int m_LastErrorThrown
Holds the last thrown error in this module, defaults to 0.
void InsertDialogueErrorProperties(int code, string message, int dialogButtonType=DBT_OK, int defaultButton=DBB_OK, int dialogMeaningType=DMT_EXCLAMATION, bool displayAdditionalInfo=true)
Insert an error with Dialogue as handling, using the Optional Variables.
void InsertErrorProperties(int code, string message="")
Insert an error with no handling.
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
override void OnEvent(EventType eventTypeId, Param params)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition gameplay.c:466