From 63aef3bceef1e1872f18888e38de88a048d6dbba Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Wed, 12 Apr 2006 02:25:31 +0000 Subject: [PATCH] added debug msgs --- dlls/ts/tsx/NRank.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/ts/tsx/NRank.cpp b/dlls/ts/tsx/NRank.cpp index ce2b4e26..c62ea8ce 100755 --- a/dlls/ts/tsx/NRank.cpp +++ b/dlls/ts/tsx/NRank.cpp @@ -37,12 +37,12 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param * { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } int attacker = params[2]; if (attacker<0||attacker>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid attacker %d", attacker); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -70,12 +70,12 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param * { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } int victim = params[2]; if (victim<0||victim>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid victim %d", victim); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -103,12 +103,12 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } int weapon = params[2]; if (weapon<0||weapon>=TSMAX_WEAPONS){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -134,12 +134,12 @@ static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param * { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } int weapon = params[2]; if (weapon<0||weapon>=TSMAX_WEAPONS){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -165,7 +165,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } GET_PLAYER_POINTER_I(index)->restartStats(); @@ -176,7 +176,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */ { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -203,7 +203,7 @@ static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param * { int index = params[1]; if (index<1||index>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index); return 0; } CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); @@ -282,31 +282,31 @@ static cell AMX_NATIVE_CALL register_cwpn(AMX *amx, cell *params){ // name,logna static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg,hp=0 int weapon = params[1]; if ( weapon < TSMAX_WEAPONS-TSMAX_CUSTOMWPNS ){ // only for custom weapons - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon); return 0; } int att = params[2]; if (att<1||att>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid attacker %d", att); return 0; } int vic = params[3]; if (vic<1||vic>gpGlobals->maxClients){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid victim %d", vic); return 0; } int dmg = params[4]; if ( dmg<1 ){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid damage %d", dmg); return 0; } int aim = params[5]; if ( aim < 0 || aim > 7 ){ - MF_RaiseAmxError(amx,AMX_ERR_NATIVE); + MF_LogError(amx, AMX_ERR_NATIVE, "Invalid aim %d", aim); return 0; }