1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-09 21:51:48 +00:00
TegraExplorer/source/script/scriptError.c
suchmememanyskill 2ddc7ae2a9 tsv3 start ig
2021-07-09 22:56:13 +02:00

16 lines
No EOL
461 B
C

#include "scriptError.h"
#include "compat.h"
#include <stdarg.h>
s64 scriptCurrentLine;
void printScriptError(u8 errLevel, char* message, ...) {
va_list args;
va_start(args, message);
gfx_printf("\n\n[%s] ", (errLevel == SCRIPT_FATAL) ? "FATAL" : (errLevel == SCRIPT_PARSER_FATAL) ? "PARSE_FATAL" : "WARN");
gfx_vprintf(message, args);
if (errLevel < SCRIPT_WARN)
gfx_printf("\nError occured on or near line %d\n", scriptCurrentLine);
va_end(args);
}