Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
connecterrorservermodule.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  WRONG_PASSWORD, // User entered wrong password
7  WRONG_VERSION, // Server and client do not have the same build while "forceSameBuild" is true
8  CONNECT_ERROR, // Unknown error
9  SESSION_FULL, // Server is full
10  FILE_PATCHING, // Bad file patching
11 
12  ALREADY_CONNECTED, // Client is already connected
13  HOST_ADDRESS, // Was unable to resolve host address
14  NET_CHANNEL, // Client failed to create NetChannel
15  CONNECT, // Connecting itself has failed
16  REQUEST_PLAYER, // Failed to request player
17  CREATE_PLAYER, // Failed to create player
18  TIMEOUT, // Packages timed out
19  UID, // Failed to find uid
20  NET_CHANNEL_SERVER, // Server failed to create NetChannel
21  ACTIVATE, // Failed to activate session
22  SERVER_LOCKED, // Server is locked by admin
23  SERVER_SHUTDOWN, // Server is shutting down soon
24  BUILD_SMALLER, // Client has a build smaller than the Server
25  BUILD_GREATER, // Client has a build greater than the Server
26  VERSION_SMALLER, // Client has a version smaller than the Server
27  VERSION_GREATER, // Client has a version greater than the Server
28  EQUAL_MOD, // Server and Client do not have equal mods while "equalModRequired" is true
29  CLIENT_DIAG, // Client is using Diag exe while Server is not
30  SERVER_DIAG, // Server is using Diag exe while Client is not
31  NO_DEVICE_ID, // Client has not acquired device id
32 };
33 
35 {
37  {
38  SetCategory(ErrorCategory.ConnectErrorServer);
39  }
40 
41  override void InitOptionalVariables()
42  {
43  super.InitOptionalVariables();
44 
45  m_Header = "#server_browser_connecting_failed";
46  }
47 
48  override void FillErrorDataMap()
49  {
50  super.FillErrorDataMap();
51 
52  InsertDialogueErrorProperties(EConnectErrorServer.WRONG_PASSWORD, "#server_browser_wrong_password");
53  InsertDialogueErrorProperties(EConnectErrorServer.WRONG_VERSION, "#server_browser_wrong_version");
54  InsertDialogueErrorProperties(EConnectErrorServer.CONNECT_ERROR, "#server_browser_wrong_connect_error");
55  InsertDialogueErrorProperties(EConnectErrorServer.SESSION_FULL, "#server_browser_session_full");
56  InsertDialogueErrorProperties(EConnectErrorServer.FILE_PATCHING, "#server_browser_bad_file_patching");
57 
58  InsertDialogueErrorProperties(EConnectErrorServer.ALREADY_CONNECTED, "#STR_already_connected");
59  InsertDialogueErrorProperties(EConnectErrorServer.HOST_ADDRESS, "#STR_host_address");
60  InsertDialogueErrorProperties(EConnectErrorServer.NET_CHANNEL, "#STR_net_channel");
61  InsertDialogueErrorProperties(EConnectErrorServer.CONNECT, "#STR_connect");
62  InsertDialogueErrorProperties(EConnectErrorServer.REQUEST_PLAYER, "#STR_request_player");
63  InsertDialogueErrorProperties(EConnectErrorServer.CREATE_PLAYER, "#STR_create_player");
64  InsertDialogueErrorProperties(EConnectErrorServer.TIMEOUT, "#STR_timeout");
66  InsertDialogueErrorProperties(EConnectErrorServer.NET_CHANNEL_SERVER, "#STR_net_channel_server");
67  InsertDialogueErrorProperties(EConnectErrorServer.ACTIVATE, "#STR_activate");
68  InsertDialogueErrorProperties(EConnectErrorServer.SERVER_LOCKED, "#STR_MP_SESSION_LOCKED");
69  InsertDialogueErrorProperties(EConnectErrorServer.SERVER_SHUTDOWN, "#STR_shutdown_server");
70  InsertDialogueErrorProperties(EConnectErrorServer.BUILD_SMALLER, "#STR_build_smaller"+"\n"+"#STR_PLEASE_UPDATE");
71  InsertDialogueErrorProperties(EConnectErrorServer.BUILD_GREATER, "#STR_build_greater"+"\n"+"#STR_PLEASE_WAIT");
72  InsertDialogueErrorProperties(EConnectErrorServer.VERSION_SMALLER, "#STR_version_smaller"+"\n"+"#STR_PLEASE_UPDATE");
73  InsertDialogueErrorProperties(EConnectErrorServer.VERSION_GREATER, "#STR_version_greater"+"\n"+"#STR_PLEASE_WAIT");
74  InsertDialogueErrorProperties(EConnectErrorServer.EQUAL_MOD, "#STR_equal_mod");
75  InsertDialogueErrorProperties(EConnectErrorServer.CLIENT_DIAG, "#STR_client_diag");
76  InsertDialogueErrorProperties(EConnectErrorServer.SERVER_DIAG, "#STR_server_diag");
77  InsertDialogueErrorProperties(EConnectErrorServer.NO_DEVICE_ID, "#STR_no_device_id");
78  }
79 
80  override void OnEvent(EventType eventTypeId, Param params)
81  {
82  switch (eventTypeId)
83  {
85 #ifndef NO_GUI
86  g_Game.GetUIManager().CloseSpecificDialog(m_LastErrorThrown);
87 #endif
88  break;
89 
90  default:
91  break;
92  }
93  }
94 }
95 
96 /*class ConnectErrorServerModuleUI : UIScriptedMenu
97 {
98  override bool OnModalResult(Widget w, int x, int y, int code, int result)
99  {
100  super.OnModalResult(w, x, y, code, result);
101 
102  int error = ErrorModuleHandler.GetCodeFromError(code);
103  switch ( error )
104  {
105  default:
106  break;
107  }
108 
109  return true;
110  }
111 }*/
SESSION_FULL
@ SESSION_FULL
Definition: connecterrorservermodule.c:9
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
EQUAL_MOD
@ EQUAL_MOD
Definition: connecterrorservermodule.c:28
EConnectErrorServer
EConnectErrorServer
Definition: connecterrorservermodule.c:1
WRONG_PASSWORD
@ WRONG_PASSWORD
Definition: connecterrorservermodule.c:6
NET_CHANNEL_SERVER
@ NET_CHANNEL_SERVER
Definition: connecterrorservermodule.c:20
MPSessionPlayerReadyEventTypeID
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition: gameplay.c:468
BUILD_GREATER
@ BUILD_GREATER
Definition: connecterrorservermodule.c:25
WRONG_VERSION
@ WRONG_VERSION
Definition: connecterrorservermodule.c:7
SERVER_LOCKED
@ SERVER_LOCKED
Definition: connecterrorservermodule.c:22
ErrorCategory
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
Definition: errormodulehandler.c:4
TIMEOUT
@ TIMEOUT
Definition: connecterrorservermodule.c:18
ACTIVATE
@ ACTIVATE
Definition: connecterrorservermodule.c:21
CREATE_PLAYER
@ CREATE_PLAYER
Definition: connecterrorservermodule.c:17
CLIENT_DIAG
@ CLIENT_DIAG
Definition: connecterrorservermodule.c:29
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
FILE_PATCHING
@ FILE_PATCHING
Definition: connecterrorservermodule.c:10
HOST_ADDRESS
@ HOST_ADDRESS
Definition: connecterrorservermodule.c:13
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
ConnectErrorServerModule
Definition: connecterrorservermodule.c:34
SERVER_DIAG
@ SERVER_DIAG
Definition: connecterrorservermodule.c:30
UNKNOWN
@ UNKNOWN
Definition: connecterrorservermodule.c:3
VERSION_SMALLER
@ VERSION_SMALLER
Definition: connecterrorservermodule.c:26
UID
@ UID
Definition: connecterrorservermodule.c:19
m_LastErrorThrown
protected int m_LastErrorThrown
Holds the last thrown error in this module, defaults to 0.
Definition: errorhandlermodule.c:69
ALREADY_CONNECTED
@ ALREADY_CONNECTED
Definition: connecterrorservermodule.c:12
m_Header
class ErrorHandlerModule m_Header
This is where to input logic and extend functionality of ErrorHandlerModule.
VERSION_GREATER
@ VERSION_GREATER
Definition: connecterrorservermodule.c:27
SERVER_SHUTDOWN
@ SERVER_SHUTDOWN
Definition: connecterrorservermodule.c:23
BUILD_SMALLER
@ BUILD_SMALLER
Definition: connecterrorservermodule.c:24
REQUEST_PLAYER
@ REQUEST_PLAYER
Definition: connecterrorservermodule.c:16
CONNECT_ERROR
@ CONNECT_ERROR
Definition: connecterrorservermodule.c:8
NO_DEVICE_ID
@ NO_DEVICE_ID
Definition: connecterrorservermodule.c:31
CONNECT
@ CONNECT
Definition: connecterrorservermodule.c:15
ErrorHandlerModuleScript
void ErrorHandlerModuleScript()
Constructor, by default calls the function that will fill the ErrorDataMap.
Definition: errorhandlermodule.c:81
OK
@ OK
Definition: connecterrorservermodule.c:4
NET_CHANNEL
@ NET_CHANNEL
Definition: connecterrorservermodule.c:14