Okay, let's analyze this log.
At the very bottom we can see this:
Code:
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] Message_TextMsg()
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] g_iCurrentGame: LR_S4S
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] szText: #Game_Commencing
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] Message_TextMsg()
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] g_iCurrentGame: LR_NONE
L 02/25/2018 - 10:54:55: [jb_lastrequest.amxx] Message_TextMsg() return PLUGIN_CONTINUE
The last three lines is perfectly fine, but the 3 before that seems odd.
We have accounted for all possibilities and it should print when the function exits. This means the function is halted prior to that.
We can see that the gamemode is LR_S4S and the szText is #Game_Commencing.
We can safely say that the code reaches this point:
Code:
public Message_TextMsg()
{
log_amx("Message_TextMsg() called");
log_amx("g_iCurrentGame: %s", g_szCurrentGame[g_iCurrentGame+1]);
if( g_iCurrentGame == LR_NONE )
{
log_amx("Message_TextMsg() return PLUGIN_CONTINUE");
return PLUGIN_CONTINUE;
}
static szText[ 25 ];
get_msg_arg_string( 2, szText, charsmax( szText ) );
log_amx("szText: %s", szText);
if( equal( szText, "#Round_Draw" ) || equal( szText, "#Game_will_restart_in" ) || equal( szText, "#Game_Commencing" ) )
{
g_iCurrentGame = LR_NONE;
strip_user_weapons( g_iLastRequest[ LR_PRISONER ] );
strip_user_weapons( g_iLastRequest[ LR_GUARD ] );
GiveWeapons( g_iLastRequest[ LR_GUARD ] );
g_iLastRequest[ LR_PRISONER ] = 0;
g_iLastRequest[ LR_GUARD ] = 0;
}
log_amx("Message_TextMsg() return PLUGIN_CONTINUE end");
return PLUGIN_CONTINUE;
}
Somewhere in that code there is a problem.
We also know that as soon as GiveWeapons is called another message will be produced, unless that is the problem itself.
Code:
log_amx("GiveWeapons() called");
Nothing wrong with that.
Also, setting a variable g_iCurrentGame is also not enough to produce an error.
The problem is obviously strip_user_weapons().
Post the logs from cstrike\addons\amxmodx\logs as well, I find it hard to believe that this does not produce an error message.
__________________