2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-03-13 14:00:19 +03:00

AMXX_Error: log into error_*.log

This commit is contained in:
s1lent 2017-11-13 19:39:20 +07:00
parent 3152021842
commit ef5283715c
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
2 changed files with 4 additions and 4 deletions

View File

@ -233,11 +233,11 @@ NOINLINE void AMXX_Error(AMX *amx, const char *fmt, ...)
auto scriptName = g_amxxapi.GetAmxScriptName(g_amxxapi.FindAmxScriptByAmx(amx)); auto scriptName = g_amxxapi.GetAmxScriptName(g_amxxapi.FindAmxScriptByAmx(amx));
if (scriptName) if (scriptName)
{ {
if ((scriptName = strrchr(scriptName, '/'))) if ((scriptName = strrchr(scriptName, CORRECT_PATH_SEPARATOR)))
scriptName++; scriptName++;
} }
g_amxxapi.Log("[%s] %s", scriptName, msg); g_amxxapi.LogError(amx, AMX_ERR_ASSERT, "[%s] %s", scriptName, msg);
} }
char* getAmxString(cell* src, char* dest, size_t max, size_t* len) char* getAmxString(cell* src, char* dest, size_t max, size_t* len)