Skip to content

πŸ†˜ This is an include that adds a centralized debugging system to the console/chat server.

License

Notifications You must be signed in to change notification settings

shierru/Debug-include

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Debug - include for open.mp

This include adds the ability to defer to console/chat.

What happens if DEBUG_ON is not defined?

If DEBUG_ON is not defined, the functions for bookmarking will not be compiled, they will simply be replaced by an empty string (you can see this by using the -l flag when compiling and looking at the resulting file).

Example

#define DEBUG_ON
#include <debug>

public OnGameModeInit()
{
    C:INFO("INFO IS %s", "PRINT");
    C:WARNING("WARNING IS %s", "PRINT");
    C:ERROR("ERROR IS %s", "PRINT");
    C:ERROR_FATAL("ERROR FATAL IS %s. AND STOP SERVER", "PRINT");
}

public OnPlayerConnect(playerid)
{
    P:INFO(playerid, 0xFFFFFFFF, "PLAYER: INFO IS %s", "PRINT");
    P:WARNING(playerid, 0xFFFFFFFF, "PLAYER: WARNING IS %s", "PRINT");
    P:ERROR(playerid, 0xFFFFFFFF, "PLAYER: ERROR IS %s", "PRINT");
    P:ERROR_FATAL(playerid, 0xFFFFFFFF, "PLAYER: ERROR FATAL IS %s. AND STOP SERVER", "PRINT");
}

Why? There are already analogs.

This repository and include are for internal use.

About

πŸ†˜ This is an include that adds a centralized debugging system to the console/chat server.

Resources

License

Stars

Watchers

Forks

Languages