2021-07-09 21:56:13 +01:00
|
|
|
#pragma once
|
|
|
|
#include "model.h"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SCRIPT_FATAL = 0,
|
|
|
|
SCRIPT_PARSER_FATAL,
|
|
|
|
SCRIPT_WARN,
|
2021-07-19 15:25:32 +01:00
|
|
|
SCRIPT_LEXER_FATAL,
|
2021-07-10 13:45:09 +01:00
|
|
|
SCRIPT_BREAK,
|
2021-07-09 21:56:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern s64 scriptCurrentLine;
|
2021-07-10 13:45:09 +01:00
|
|
|
extern u8 scriptLastError;
|
2021-07-09 21:56:13 +01:00
|
|
|
|
|
|
|
void printScriptError(u8 errLevel, char* message, ...);
|
|
|
|
|
|
|
|
#define SCRIPT_FATAL_ERR(message, ...) printScriptError(SCRIPT_FATAL, message, ##__VA_ARGS__); return NULL
|
|
|
|
#define SCRIPT_WARN_ERR(message, ...) printScriptError(SCRIPT_WARN, message, ##__VA_ARGS__)
|
|
|
|
|