Fixed module correction output

This commit is contained in:
David Anderson
2004-09-09 06:04:50 +00:00
parent 59880371e1
commit b8721e0123
6 changed files with 57 additions and 12 deletions

View File

@@ -222,6 +222,7 @@ int CheckModules(AMX *amx, char error[64])
{
cell retVal = 0;
int err = 0;
no_module_test = 1;
if ( (err = amx_Exec(amx, &retVal, idx, 0)) == AMX_ERR_NONE )
{
unsigned int i = 0;
@@ -261,9 +262,11 @@ int CheckModules(AMX *amx, char error[64])
}
} else {
AMXXLOG_Log("[AMXX] Run time error %d on line %ld during module check.", err, amx->curline);
no_module_test = 0;
//could not execute
return -1; //bad! very bad!
}
no_module_test = 0;
} else {
return -1;
}
@@ -292,7 +295,9 @@ int set_amxnatives(AMX* amx,char error[64])
{
if (CheckModules(amx, error) == -1)
{
//HACKHACK
//HACKHACK - if we get here, nullify the plugin's native table
// - BAILOPAN
amx_NullNativeTable(amx);
sprintf(error,"Plugin uses an unknown function (name \"%s\") - check your modules.ini.",no_function);
}
return (amx->error = AMX_ERR_NATIVE);