DayZ 1.24
Loading...
Searching...
No Matches
ConnectErrorScriptModule.c File Reference

Go to the source code of this file.

Classes

class  ConnectErrorScriptModuleUI
 

Enumerations

enum  EConnectErrorScript
 

Functions

enum EConnectErrorScript ConnectErrorScriptModule ()
 
override void InitOptionalVariables ()
 
override void FillErrorDataMap ()
 
override void OnEvent (EventType eventTypeId, Param params)
 Handles VON-related events.
 

Variables

 UNKNOWN = -1
 
 OK = 0
 
 ALREADY_CONNECTING
 
 ALREADY_CONNECTING_THIS
 

Enumeration Type Documentation

◆ EConnectErrorScript

Definition at line 1 of file ConnectErrorScriptModule.c.

2{
3 UNKNOWN = -1, // -1 must always be UNKNOWN
4 OK = 0, // 0 must always be OK
5
6 ALREADY_CONNECTING, // Already joining a server
7 ALREADY_CONNECTING_THIS, // Already joining this exact server
8}

Function Documentation

◆ ConnectErrorScriptModule()

enum EConnectErrorScript ConnectErrorScriptModule ( )

Definition at line 1 of file ConnectErrorScriptModule.c.

13 {
14 SetCategory(ErrorCategory.ConnectErrorScript);
15 }
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...

References ALREADY_CONNECTING, ALREADY_CONNECTING_THIS, OK, and UNKNOWN.

Referenced by ErrorModuleHandler::Init().

◆ FillErrorDataMap()

override void FillErrorDataMap ( )

Definition at line 27 of file ConnectErrorScriptModule.c.

28 {
29 super.FillErrorDataMap();
30
31 InsertDialogueErrorProperties(EConnectErrorScript.ALREADY_CONNECTING, "#STR_script_already_connecting", DBT_YESNOCANCEL, DBB_NO);
32 InsertDialogueErrorProperties(EConnectErrorScript.ALREADY_CONNECTING_THIS, "#STR_script_already_connecting_this");
33 }
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.

References InsertDialogueErrorProperties().

Referenced by ErrorHandlerModuleScript().

◆ InitOptionalVariables()

override void InitOptionalVariables ( )

Definition at line 17 of file ConnectErrorScriptModule.c.

18 {
19 super.InitOptionalVariables();
20
21 m_Header = "#server_browser_connecting_failed";
22#ifndef NO_GUI
24#endif
25 }
class ErrorHandlerModule m_Header
This is where to input logic and extend functionality of ErrorHandlerModule.
ref UIScriptedMenu m_UIHandler
Optional: The UI the handler might generally use

Referenced by ErrorHandlerModuleScript().

◆ OnEvent()

override void OnEvent ( EventType eventTypeId,
Param params )

Handles VON-related events.

Parameters
eventTypeIdevent that fired
paramsevent-specific parameters

Definition at line 35 of file ConnectErrorScriptModule.c.

36 {
37 switch (eventTypeId)
38 {
40#ifndef NO_GUI
41 g_Game.GetUIManager().CloseSpecificDialog(m_LastErrorThrown);
42#endif
43 break;
44
45 default:
46 break;
47 }
48 }
DayZGame g_Game
Definition DayZGame.c:3528
int m_LastErrorThrown
Holds the last thrown error in this module, defaults to 0.
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition gameplay.c:466

References g_Game, m_LastErrorThrown, and MPSessionPlayerReadyEventTypeID.

Variable Documentation

◆ ALREADY_CONNECTING

@ ALREADY_CONNECTING

Definition at line 16 of file ConnectErrorScriptModule.c.

Referenced by ConnectErrorScriptModule().

◆ ALREADY_CONNECTING_THIS

ALREADY_CONNECTING_THIS

Definition at line 17 of file ConnectErrorScriptModule.c.

Referenced by ConnectErrorScriptModule().

◆ OK

@ OK = 0

Definition at line 14 of file ConnectErrorScriptModule.c.

Referenced by ConnectErrorScriptModule().

◆ UNKNOWN

@ UNKNOWN = -1

Definition at line 13 of file ConnectErrorScriptModule.c.

Referenced by ConnectErrorScriptModule().