using new function names and parameters

This commit is contained in:
Pavol Marko 2004-03-27 17:06:08 +00:00
parent bada4d4336
commit 0612e67e2d
7 changed files with 55 additions and 53 deletions

View File

@ -414,7 +414,7 @@ void EventsMngr::executeEvents()
if ((err = amx_Exec((*iter).m_Plugin->getAMX(), NULL, (*iter).m_Func, 1, m_ParseVault ? m_ParseVault[0].iValue : 0)) != AMX_ERR_NONE)
{
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,
(*iter).m_Plugin->getAMX()->curline, (*iter).m_Plugin->getName());
}
}
@ -423,7 +423,7 @@ void EventsMngr::executeEvents()
}
catch( ... )
{
UTIL_Log( "[AMXX] fatal error at event execution");
AMXXLOG_Log( "[AMXX] fatal error at event execution");
}
#endif // #ifdef ENABLEEXEPTIONS

View File

@ -68,7 +68,7 @@ void CForwardMngr::executeForwards( int type , int num , int player ) {
{
if ((err = amx_Exec(a->getPlugin()->getAMX(), &ret, a->getFunction() , num, player)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,a->getPlugin()->getAMX()->curline,a->getPlugin()->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,a->getPlugin()->getAMX()->curline,a->getPlugin()->getName());
if ( ret )
break;

View File

@ -175,7 +175,7 @@ void LogEventsMngr::executeLogEvents()
if (valid){
if ((err = amx_Exec(a->plugin->getAMX(), NULL , a->func , 0)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,a->plugin->getAMX()->curline,a->plugin->getName());
}
@ -183,7 +183,7 @@ void LogEventsMngr::executeLogEvents()
}
catch( ... )
{
UTIL_Log( "[AMXX] fatal error at log forward function execution");
AMXXLOG_Log( "[AMXX] fatal error at log forward function execution");
}
#endif

View File

@ -56,7 +56,7 @@ int CPluginMngr::loadPluginsFromFile( const char* filename )
if ( !fp )
{
UTIL_Log( "[AMXX] Plugins list not found (file \"%s\")",filename);
AMXXLOG_Log( "[AMXX] Plugins list not found (file \"%s\")",filename);
return 1;
}
@ -105,7 +105,7 @@ int CPluginMngr::loadPluginsFromFile( const char* filename )
}
else
{
UTIL_Log("[AMXX] %s (plugin \"%s\")", error, pluginName );
AMXXLOG_Log("[AMXX] %s (plugin \"%s\")", error, pluginName );
}
}

View File

@ -642,7 +642,7 @@ static cell AMX_NATIVE_CALL register_menucmd(AMX *amx, cell *params) /* 3 param
char* sptemp = get_amxstring(amx,params[3],0,ilen);
if(amx_FindPublic(amx, sptemp ,&idx)!=AMX_ERR_NONE) {
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",sptemp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",sptemp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -685,7 +685,7 @@ static cell AMX_NATIVE_CALL register_concmd(AMX *amx, cell *params) /* 4 param *
int i, idx = 0;
char* temp = get_amxstring(amx,params[2],0, i );
if(amx_FindPublic(amx, temp ,&idx)!=AMX_ERR_NONE) {
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -712,7 +712,7 @@ static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
int i, idx = 0;
char* temp = get_amxstring(amx,params[2],0, i );
if(amx_FindPublic(amx, temp ,&idx)!=AMX_ERR_NONE) {
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -737,7 +737,7 @@ static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param *
int i, idx = 0;
char* temp = get_amxstring(amx,params[2],0, i );
if(amx_FindPublic(amx, temp ,&idx)!=AMX_ERR_NONE) {
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return NULL;
}
@ -831,7 +831,7 @@ static cell AMX_NATIVE_CALL register_event(AMX *amx, cell *params) /* 2 param */
char* sTemp = get_amxstring(amx,params[1],0,len);
if ( (pos = g_events.getEventId( sTemp )) == 0 ) {
UTIL_Log("[AMXX] Invalid event (name \"%s\") (plugin \"%s\")", sTemp , plugin->getName() );
AMXXLOG_Log("[AMXX] Invalid event (name \"%s\") (plugin \"%s\")", sTemp , plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -839,7 +839,7 @@ static cell AMX_NATIVE_CALL register_event(AMX *amx, cell *params) /* 2 param */
sTemp = get_amxstring(amx,params[2],0,len);
if ( amx_FindPublic(amx, sTemp , &iFunction) != AMX_ERR_NONE){
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",sTemp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",sTemp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -1494,7 +1494,7 @@ static cell AMX_NATIVE_CALL set_task(AMX *amx, cell *params) /* 2 param */
char* stemp = get_amxstring(amx,params[2],1, a );
if (amx_FindPublic(amx, stemp , &iFunc) != AMX_ERR_NONE){
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",stemp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",stemp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -1639,7 +1639,7 @@ static cell AMX_NATIVE_CALL pause(AMX *amx, cell *params) /* 3 param */
temp = get_amxstring(amx,params[2],0,ilen);
int err, index;
if ((err = amx_FindPublic( plugin->getAMX(), temp , &index) )!= AMX_ERR_NONE){
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")", temp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")", temp,plugin->getName() );
return 0;
}
plugin->pauseFunction( index );
@ -1681,7 +1681,7 @@ static cell AMX_NATIVE_CALL unpause(AMX *amx, cell *params) /* 3 param */
sptemp = get_amxstring(amx,params[2],0,ilen);
int err, index;
if ((err = amx_FindPublic(plugin->getAMX(), sptemp , &index) )!= AMX_ERR_NONE){
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")", sptemp,plugin->getName() );
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")", sptemp,plugin->getName() );
return 0;
}
plugin->unpauseFunction( index );
@ -2037,7 +2037,7 @@ static cell AMX_NATIVE_CALL register_logevent(AMX *amx, cell *params)
char* temp = get_amxstring(amx,params[1],0, a );
if (amx_FindPublic(amx, temp , &iFunc) != AMX_ERR_NONE){
UTIL_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",
temp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return 0;
@ -2090,7 +2090,7 @@ static cell AMX_NATIVE_CALL is_plugin_loaded(AMX *amx, cell *params)
// native get_modulesnum();
static cell AMX_NATIVE_CALL get_modulesnum(AMX *amx, cell *params)
{
return (cell)UTIL_GetModulesNum(UTIL_MODULES_ALL);
return (cell)countModules(CountModules_All);
}
// native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status);
@ -2117,7 +2117,7 @@ static cell AMX_NATIVE_CALL get_module(AMX *amx, cell *params)
if (numParams < 8)
{
CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx);
UTIL_Log("[AMXX] get_module: call to a previous version (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] get_module: call to a previous version (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
}
@ -2126,7 +2126,7 @@ static cell AMX_NATIVE_CALL get_module(AMX *amx, cell *params)
if (amx_GetAddr(amx, params[8], &addr) != AMX_ERR_NONE)
{
CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx);
UTIL_Log("[AMXX] get_module: invalid reference (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] get_module: invalid reference (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
}
@ -2141,7 +2141,7 @@ static cell AMX_NATIVE_CALL log_amx(AMX *amx, cell *params)
CPluginMngr::CPlugin *plugin = g_plugins.findPluginFast(amx);
int len;
UTIL_Log("[%s] %s", plugin->getName(), format_amxstring(amx, params, 1, len));
AMXXLOG_Log("[%s] %s", plugin->getName(), format_amxstring(amx, params, 1, len));
return 0;
}
@ -2171,7 +2171,7 @@ static cell AMX_NATIVE_CALL callfunc_begin(AMX *amx, cell *params)
if (g_CallFunc_Plugin)
{
// scripter's fault
UTIL_Log("[AMXX] callfunc_begin called without callfunc_end (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] callfunc_begin called without callfunc_end (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
@ -2210,7 +2210,7 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params)
if (!g_CallFunc_Plugin)
{
// scripter's fault
UTIL_Log("[AMXX] callfunc_end called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] callfunc_end called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
@ -2237,7 +2237,7 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params)
// actual call
if ((err = amx_Execv(plugin->getAMX(), &retVal, func, curParam, gparams)) != AMX_ERR_NONE)
{
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, curPlugin->getAMX()->curline, curPlugin->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, curPlugin->getAMX()->curline, curPlugin->getName());
return 0;
}
@ -2274,14 +2274,14 @@ static cell callfunc_push_byval(AMX *amx, cell *params)
if (!g_CallFunc_Plugin)
{
// scripter's fault
UTIL_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
if (g_CallFunc_CurParam == CALLFUNC_MAXPARAMS)
{
UTIL_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
AMXXLOG_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
@ -2300,14 +2300,14 @@ static cell callfunc_push_byref(AMX *amx, cell *params)
if (!g_CallFunc_Plugin)
{
// scripter's fault
UTIL_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
if (g_CallFunc_CurParam == CALLFUNC_MAXPARAMS)
{
UTIL_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
AMXXLOG_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
@ -2358,14 +2358,14 @@ static cell callfunc_push_str(AMX *amx, cell *params)
if (!g_CallFunc_Plugin)
{
// scripter's fault
UTIL_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
AMXXLOG_Log("[AMXX] callfunc_push_xxx called without callfunc_begin (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
if (g_CallFunc_CurParam == CALLFUNC_MAXPARAMS)
{
UTIL_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
AMXXLOG_Log("[AMXX] callfunc_push_xxx: maximal parameters num: %d", CALLFUNC_MAXPARAMS);
amx_RaiseError(amx, AMX_ERR_NATIVE);
return 0;
}
@ -2400,7 +2400,8 @@ static cell callfunc_push_str(AMX *amx, cell *params)
// copy it to the allocated memory
// we assume it's unpacked
amx_SetString(phys_addr, str, 0);
// :NOTE: 4th parameter use_wchar since Small Abstract Machine 2.5.0
amx_SetString(phys_addr, str, 0, 0);
// push the address and set the reference flag so that memory is released after function call.
g_CallFunc_ParamInfo[g_CallFunc_CurParam].flags = CALLFUNC_FLAG_BYREF;

View File

@ -154,14 +154,14 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn
cell amx_addr2, *phys_addr2;
if ((amx_Allot(c, 64 , &amx_addr1, &phys_addr1) != AMX_ERR_NONE) ||
(amx_Allot(c, 64 , &amx_addr2, &phys_addr2) != AMX_ERR_NONE) ){
UTIL_Log("[AMXX] Failed to allocate AMX memory (plugin \"%s\")",(*a).getPlugin()->getName());
AMXXLOG_Log("[AMXX] Failed to allocate AMX memory (plugin \"%s\")",(*a).getPlugin()->getName());
}
else {
int err;
set_amxstring(c,amx_addr1,filename,63);
set_amxstring(c,amx_addr2,disconnect_message,63);
if ((err = amx_Exec(c,&ret, (*a).getFunction() , 3, pPlayer->index, amx_addr1, amx_addr2)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,c->curline,(*a).getPlugin()->getName());
int len;
strcpy(disconnect_message,get_amxstring(c,amx_addr2,0,len));
@ -177,7 +177,7 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn
#ifdef ENABLEEXEPTIONS
}catch( ... )
{
UTIL_Log( "[AMXX] fatal error at inconsistent file forward execution");
AMXXLOG_Log( "[AMXX] fatal error at inconsistent file forward execution");
}
#endif
@ -217,7 +217,7 @@ int Spawn( edict_t *pent ) {
if (g_log_dir.empty())
{
g_log_dir.set(get_localinfo("amxx_logs", "addons/amxx/logs"));
UTIL_MakeNewLogFile();
AMXXLOG_MakeNewLogFile();
}
// ###### Initialize task manager
@ -241,7 +241,7 @@ int Spawn( edict_t *pent ) {
// ###### Load modules
loadModules(get_localinfo("amxx_modules", "addons/amxx/modules.ini"));
attachModules();
int loaded = UTIL_GetModulesNum(UTIL_MODULES_RUNNING); // Call after attachModules so all modules don't have pending stat
int loaded = countModules(CountModules_Running); // Call after attachModules so all modules don't have pending stat
// Set some info about amx version and modules
if ( loaded ){
char buffer[64];
@ -435,7 +435,7 @@ void ServerDeactivate_Post() {
g_plugins.clear();
g_log_dir.clear();
UTIL_Log("Log file closed.");
AMXXLOG_Log("Log file closed.");
RETURN_META(MRES_IGNORED);
}
@ -535,7 +535,7 @@ void ClientCommand( edict_t *pEntity ) {
{
if ((err = amx_Exec((*a).getPlugin()->getAMX(), &ret , (*a).getFunction(), 1, pPlayer->index)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName() );
if ( ret & 2 ) result = MRES_SUPERCEDE;
@ -550,7 +550,7 @@ void ClientCommand( edict_t *pEntity ) {
#ifdef ENABLEEXEPTIONS
}catch( ... )
{
UTIL_Log( "[AMXX] fatal error at commmand forward execution");
AMXXLOG_Log( "[AMXX] fatal error at commmand forward execution");
}
#endif
@ -573,7 +573,7 @@ void ClientCommand( edict_t *pEntity ) {
{
if ((err =amx_Exec((*aa).getPlugin()->getAMX(), &ret , (*aa).getFunction() , 3, pPlayer->index, (*aa).getFlags(),(*aa).getId() )) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,(*aa).getPlugin()->getAMX()->curline,(*aa).getPlugin()->getName());
if ( ret & 2 ) result = MRES_SUPERCEDE;
@ -586,7 +586,7 @@ void ClientCommand( edict_t *pEntity ) {
#ifdef ENABLEEXEPTIONS
}catch( ... )
{
UTIL_Log( "[AMXX] fatal error at client commmand execution");
AMXXLOG_Log( "[AMXX] fatal error at client commmand execution");
}
#endif
/* check menu commands */
@ -613,7 +613,7 @@ void ClientCommand( edict_t *pEntity ) {
{
if ( ( err = amx_Exec((*a).getPlugin()->getAMX(), &ret ,(*a).getFunction() , 2, pPlayer->index,pressed_key)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
if ( ret & 2 ) result = MRES_SUPERCEDE;
@ -627,7 +627,7 @@ void ClientCommand( edict_t *pEntity ) {
}
catch( ... )
{
UTIL_Log( "[AMXX] fatal error at menu commmand execution");
AMXXLOG_Log( "[AMXX] fatal error at menu commmand execution");
}
#endif
}
@ -688,14 +688,14 @@ void StartFrame_Post( void ) {
if (amx_Allot(plugin->getAMX(), task.getParamLen() , &amx_addr, &phys_addr) != AMX_ERR_NONE)
{
UTIL_Log("[AMXX] Failed to allocate AMX memory (task \"%d\") (plugin \"%s\")", task.getTaskId(),plugin->getName());
AMXXLOG_Log("[AMXX] Failed to allocate AMX memory (task \"%d\") (plugin \"%s\")", task.getTaskId(),plugin->getName());
}
else
{
copy_amxmemory(phys_addr, task.getParam() , task.getParamLen() );
if ((err = amx_Exec(plugin->getAMX(),NULL, task.getFunction() , 2, amx_addr, task.getTaskId() )) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (task \"%d\") (plugin \"%s\")", err,plugin->getAMX()->curline,task.getTaskId(),plugin->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (task \"%d\") (plugin \"%s\")", err,plugin->getAMX()->curline,task.getTaskId(),plugin->getName());
amx_Release(plugin->getAMX(), amx_addr);
}
@ -703,7 +703,7 @@ void StartFrame_Post( void ) {
else // call without arguments
{
if ((err = amx_Exec(plugin->getAMX(),NULL, task.getFunction() ,1, task.getTaskId() )) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (task \"%d\") (plugin \"%s\")", err,plugin->getAMX()->curline,task.getTaskId(),plugin->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (task \"%d\") (plugin \"%s\")", err,plugin->getAMX()->curline,task.getTaskId(),plugin->getName());
}
}
}
@ -800,7 +800,7 @@ void MessageEnd_Post(void) {
{
if ((err = amx_Exec((*a).getPlugin()->getAMX(), NULL , (*a).getFunction() , 1, mPlayerIndex /*g_events.getArgInteger(0)*/ )) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
++a;
@ -811,7 +811,7 @@ void MessageEnd_Post(void) {
}
catch( ... )
{
UTIL_Log( "[AMXX] fatal error at event execution");
AMXXLOG_Log( "[AMXX] fatal error at event execution");
}
#endif
#endif
@ -887,7 +887,7 @@ void AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...) {
while ( a )
{
if ((err = amx_Exec((*a).getPlugin()->getAMX(), NULL , (*a).getFunction() , 1,mPlayerIndex)) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
++a;
@ -897,7 +897,7 @@ void AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...) {
}
catch( ... )
{
UTIL_Log( "[AMXX] fatal error at log event execution");
AMXXLOG_Log( "[AMXX] fatal error at log event execution");
}
#endif
#endif
@ -982,8 +982,9 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
}
// ###### Initialize logging here
AMXXLOG_Init();
g_log_dir.set(get_localinfo("amxx_logs", "addons/amxx/logs"));
UTIL_MakeNewLogFile();
AMXXLOG_MakeNewLogFile();
// ###### Now attach metamod modules
attachMetaModModules( get_localinfo("amxx_modules", "addons/amxx/modules.ini") );

View File

@ -209,7 +209,7 @@ void plugin_srvcmd()
if ((err = amx_Exec( (*a).getPlugin()->getAMX(), &ret , (*a).getFunction()
, 3 , g_srvindex , (*a).getFlags() , (*a).getId() )) != AMX_ERR_NONE)
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",
err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
if ( ret ) break;
@ -221,7 +221,7 @@ void plugin_srvcmd()
#ifdef ENABLEEXEPTIONS
}catch( ... )
{
UTIL_Log( "[AMXX] fatal error at forward function execution");
AMXXLOG_Log( "[AMXX] fatal error at forward function execution");
}
#endif