Nuclide
Software Development Kit for id Tech
error.h File Reference

Go to the source code of this file.

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...
 

Variables

var string g_lastDisconnectReason = ""
 

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.

Variable Documentation

◆ g_lastDisconnectReason

var string g_lastDisconnectReason = ""