Nuclide
Software Development Kit for id Tech
Server Error Message Query

Retrieve server error messages, reasons etc. More...

Functions

bool Error_ServerDisconnected (void)
 Query if we've been disconnected from the server. More...
 
string Error_GetDisconnectReason (void)
 Query the last reason for a server disconnect. More...
 

Detailed Description

Retrieve server error messages, reasons etc.

Function Documentation

◆ Error_GetDisconnectReason()

string Error_GetDisconnectReason ( void  )

Query the last reason for a server disconnect.

Will stick and always return something valid when you've been disconnected at least once.

Returns
The reason for the disconnect.

◆ Error_ServerDisconnected()

bool Error_ServerDisconnected ( void  )

Query if we've been disconnected from the server.

The function is designed to be run every frame. It will return true only once per server session, so check it in one place and cache the result if necessary. This is meant for menu developers. If you are adding onto an existing menu framework, calling it more than once and out of order may break core menu functionality in your module.

Returns
Will return true if we've been disconnected and false any other time.