Added better error reporting

Added new SDK version
This commit is contained in:
David Anderson
2004-08-29 17:55:11 +00:00
parent 7703c36a90
commit 9a3e53478e
7 changed files with 97 additions and 91 deletions

View File

@ -303,8 +303,13 @@ static cell AMX_NATIVE_CALL register_message(AMX *amx, cell *params)
if (params[1]>0 && params[1] < 256) {
int id = MF_RegisterSPForwardByName(amx, MF_GetAmxString(amx, params[2], 0, &len), FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE);
// MF_Log("Registering message %d with result %d", params[1], id);
msgHooks[params[1]] = id;
return id;
if (id != -1)
{
msgHooks[params[1]] = id;
return id;
} else {
return -1;
}
}
return 0;