HoS_PRC8/_mod/_module/nss/rtsa_headere.nss

32 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-11-25 19:36:07 -05:00
///////////////////////////////////////////////////////////////////////////////////
// REAL TIME STRATEGY ADVENTURE - Kit
// FILE: rtsa_headere
// NAME: Header Error Reporting
// SCRIPTED BY: Deva Bryson Winblood
// DATE: 03/26/2003
///////////////////////////////////////////////////////////////////////////////////
/* This header provides an error function which will send errors to the log file
as well as put them on the screen for the player designated. */
int RTSA_DEBUG_ON = FALSE; // set this to true if you want debug messages reported
void fnDebug(string sMsg, object oPC=OBJECT_INVALID)
{ // debug messages
object oRecipient=oPC;
if (oPC==OBJECT_INVALID) oRecipient=GetFirstPC();
if (RTSA_DEBUG_ON)
{ // debug message ok
SendMessageToPC(oRecipient,sMsg);
PrintString("DEBUG MODE:"+sMsg);
} // debug message ok
} // fnDebug()
void fnError(string sErr, object oPC=OBJECT_INVALID)
{ // error messages
object oRecipient=oPC;
if (oPC==OBJECT_INVALID) oRecipient=GetFirstPC();
SendMessageToPC(oRecipient,sErr);
PrintString(sErr);
} // error messages