Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 
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
59  override void OnEvent(EventType eventTypeId, Param params)
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 }*/
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
VERSION_MISMATCH_AB
@ VERSION_MISMATCH_AB
Definition: connecterrorclientmodule.c:14
PASSWORD
@ PASSWORD
Definition: connecterrorclientmodule.c:19
SERVER_UNREACHABLE
@ SERVER_UNREACHABLE
Definition: connecterrorclientmodule.c:6
MPSessionPlayerReadyEventTypeID
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition: gameplay.c:468
InsertErrorProperties
void InsertErrorProperties(int code, string message="")
Insert an error with no handling.
Definition: errorhandlermodule.c:269
VERSION_MISMATCH_RB
@ VERSION_MISMATCH_RB
Definition: connecterrorclientmodule.c:13
OK
@ OK
Definition: connecterrorclientmodule.c:4
ErrorCategory
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
Definition: errormodulehandler.c:4
EventType
TypeID EventType
Definition: enwidgets.c:55
InsertDialogueErrorProperties
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.
Definition: errorhandlermodule.c:233
INVALID_SESSION
@ INVALID_SESSION
Definition: connecterrorclientmodule.c:10
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
UNKNOWN
@ UNKNOWN
Definition: connecterrorclientmodule.c:3
ERROR_MSG_SHOWED
@ ERROR_MSG_SHOWED
Definition: connecterrorclientmodule.c:8
EMPTY_PASSWORD
@ EMPTY_PASSWORD
Definition: connecterrorclientmodule.c:17
ALREADY_CONNECTING
@ ALREADY_CONNECTING
Definition: connecterrorclientmodule.c:7
m_LastErrorThrown
protected int m_LastErrorThrown
Holds the last thrown error in this module, defaults to 0.
Definition: errorhandlermodule.c:69
m_Header
class ErrorHandlerModule m_Header
This is where to input logic and extend functionality of ErrorHandlerModule.
ConnectErrorClientModule
Definition: connecterrorclientmodule.c:23
EConnectErrorClient
EConnectErrorClient
Definition: connecterrorclientmodule.c:1
BE_LICENCE
@ BE_LICENCE
Definition: connecterrorclientmodule.c:20
ErrorHandlerModuleScript
void ErrorHandlerModuleScript()
Constructor, by default calls the function that will fill the ErrorDataMap.
Definition: errorhandlermodule.c:81
DLC_CHECK_FAILED
@ DLC_CHECK_FAILED
Definition: connecterrorclientmodule.c:16
INCORRECT_CLIENT_STATE
@ INCORRECT_CLIENT_STATE
Definition: connecterrorclientmodule.c:9
VERSION_MISMATCH
@ VERSION_MISMATCH
Definition: connecterrorclientmodule.c:12