From 662289eb28b7893c23dadec02d17df7ec1084e55 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Wed, 12 Apr 2006 01:51:23 +0000 Subject: [PATCH] added some debug msgs --- dlls/engine/globals.cpp | 10 +++++----- dlls/engine/messages.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/engine/globals.cpp b/dlls/engine/globals.cpp index 198cc5c7..3b0ab130 100755 --- a/dlls/engine/globals.cpp +++ b/dlls/engine/globals.cpp @@ -50,7 +50,7 @@ static cell AMX_NATIVE_CALL get_global_float(AMX *amx, cell *params) returnValue = gpGlobals->trace_startsolid; break; default: - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Undefined global_float index %d", params[1]); return 0; } @@ -81,7 +81,7 @@ static cell AMX_NATIVE_CALL get_global_int(AMX *amx, cell *params) returnValue = gpGlobals->trace_hitgroup; break; default: - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Undefined global_int index %d", params[1]); return 0; } @@ -103,7 +103,7 @@ static cell AMX_NATIVE_CALL get_global_string(AMX *amx, cell *params) returnValue = &(gpGlobals->startspot); break; default: - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Undefined global_string index %d", params[1]); return 0; } @@ -135,7 +135,7 @@ static cell AMX_NATIVE_CALL get_global_vector(AMX *amx, cell *params) // globals fetchedVector = gpGlobals->vecLandmarkOffset; break; default: - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Undefined global_vector index %d", params[1]); return 0; } @@ -155,7 +155,7 @@ static cell AMX_NATIVE_CALL get_global_edict(AMX *amx, cell *params) // globals_ pReturnEntity = gpGlobals->trace_ent; break; default: - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Undefined global_edict index %d", params[1]); return 0; } diff --git a/dlls/engine/messages.cpp b/dlls/engine/messages.cpp index 090164c8..4086c7a4 100755 --- a/dlls/engine/messages.cpp +++ b/dlls/engine/messages.cpp @@ -357,7 +357,7 @@ static cell AMX_NATIVE_CALL set_msg_block(AMX *amx, cell *params) int block = params[2]; if (msgid < 1 || msgid > 255) { - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid message id"); return 0; } @@ -371,7 +371,7 @@ static cell AMX_NATIVE_CALL get_msg_block(AMX *amx, cell *params) int msgid = params[1]; if (msgid < 1 || msgid > 255) { - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid message id"); return 0; } @@ -490,7 +490,7 @@ static cell AMX_NATIVE_CALL set_msg_arg_string(AMX *amx, cell *params) static cell AMX_NATIVE_CALL get_msg_origin(AMX *amx, cell *params) { if (!inhook) { - MF_RaiseAmxError(amx, AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Not in a message hook"); return 0; }