Dayz Explorer 1.28.160049
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 ALREADY_ON_ANOTHER_SERVER, // Player is already playing on a different server
23 COMMUNICATION_TIMED_OUT, // Communication timed out
24 ALREADY_ON_SERVER, // Player is already playing on this server
25};
26
27class ConnectErrorClientModule : ErrorHandlerModuleScript
28{
30 {
31 SetCategory(ErrorCategory.ConnectErrorClient);
32 }
33
34 override void InitOptionalVariables()
35 {
36 super.InitOptionalVariables();
37
38 m_Header = "#server_browser_connecting_failed";
39 }
40
41 override void FillErrorDataMap()
42 {
43 super.FillErrorDataMap();
44
45 InsertDialogueErrorProperties(EConnectErrorClient.SERVER_UNREACHABLE, "#STR_server_unreachable");
46 InsertDialogueErrorProperties(EConnectErrorClient.ALREADY_CONNECTING, "#STR_already_connecting");
47 InsertDialogueErrorProperties(EConnectErrorClient.ERROR_MSG_SHOWED, "#STR_error_msg_showed");
48 InsertDialogueErrorProperties(EConnectErrorClient.INCORRECT_CLIENT_STATE, "#STR_incorrect_client_state");
49 InsertDialogueErrorProperties(EConnectErrorClient.INVALID_SESSION, "#STR_invalid_session");
50
51 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH, "#multi_server_not_compatible_message");
52 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH_RB, "#multi_server_not_compatible_message");
53 InsertDialogueErrorProperties(EConnectErrorClient.VERSION_MISMATCH_AB, "#multi_server_not_compatible_message");
54
55 InsertDialogueErrorProperties(EConnectErrorClient.DLC_CHECK_FAILED, "#mod_detail_info_warning");
56 InsertDialogueErrorProperties(EConnectErrorClient.EMPTY_PASSWORD, "#STR_empty_password");
57
60
61 InsertDialogueErrorProperties(EConnectErrorClient.ALREADY_ON_ANOTHER_SERVER,"#STR_already_on_another_server");
62 InsertDialogueErrorProperties(EConnectErrorClient.COMMUNICATION_TIMED_OUT, "#STR_BIOS_CommTimeOutError");
63 InsertDialogueErrorProperties(EConnectErrorClient.ALREADY_ON_SERVER, "#ps4_already_in_session");
64 }
65
66#ifndef NO_GUI
67 override void OnEvent(EventType eventTypeId, Param params)
68 {
69 switch (eventTypeId)
70 {
72 g_Game.GetUIManager().CloseSpecificDialog(m_LastErrorThrown);
73 break;
74
75 default:
76 break;
77 }
78 }
79#endif
80}
81
82/*class ConnectErrorClientModuleUI : UIScriptedMenu
83{
84 override bool OnModalResult(Widget w, int x, int y, int code, int result)
85 {
86 super.OnModalResult(w, x, y, code, result);
87
88 int error = ErrorModuleHandler.GetCodeFromError(code);
89 switch ( error )
90 {
91 default:
92 break;
93 }
94
95 return true;
96 }
97}*/
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
@ ALREADY_CONNECTING
@ COMMUNICATION_TIMED_OUT
@ ALREADY_ON_ANOTHER_SERVER
@ VERSION_MISMATCH_AB
@ INCORRECT_CLIENT_STATE
@ SERVER_UNREACHABLE
@ VERSION_MISMATCH_RB
DayZGame g_Game
Definition dayzgame.c:3868
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...
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition gameplay.c:481
TypeID EventType
Definition enwidgets.c:55