Od Wczoraj mam problemy z crashami serwera.
Logi:
L 04/27/2015 - 17:19:16: [AMXX] Displaying debug trace (plugin "amxbans_main.amxx") L 04/27/2015 - 17:19:16: [AMXX] Run time error 4: index out of bounds L 04/27/2015 - 17:19:16: [AMXX] [0] cmdBan.inl::_select_amxbans_motd (line 649) L 04/27/2015 - 17:19:16: [AMXX] [1] color_chat.inl::Team_Info (line 115) L 04/27/2015 - 17:19:16: [AMXX] [2] color_chat.inl::ColorChat (line 96) L 04/27/2015 - 17:19:16: [AMXX] [3] cmdBan.inl::_select_amxbans_motd (line 648)
Kawałek kodu i Linijka 648/649 - cmdBan.inl:
case 2:
{
new playerCount, idx, players[32]
get_players(players, playerCount)
for (idx=0; idx<playerCount; idx++) {
if (is_user_hltv(players[idx]) || is_user_bot(players[idx])) continue // Dont count HLTV or bots as players
get_time_length(players[idx], iBanLength, timeunit_minutes, cTimeLengthPlayer, 127)
if (g_choiceTime[id] > 0)
format(message,190, "%L", players[idx], "PUBLIC_BAN_ANNOUNCE_2", pl_nick, cTimeLengthPlayer, ban_reason, admin_nick)
else
format(message,190, "%L", players[idx], "PUBLIC_BAN_ANNOUNCE_2_PERM", pl_nick, ban_reason, admin_nick)
if ( get_pcvar_num(pcvar_show_hud_messages) == 1 ) {
set_hudmessage(0, 255, 0, 0.05, 0.30, 0, 6.0, 10.0 , 0.5, 0.15, -1)
ShowSyncHudMsg(players[idx], g_MyMsgSync, "%s", message)
}
//client_print(players[idx],print_chat, "%s", message)
ColorChat(players[idx], RED, "[AMXBans]^x01 %s", message) // Linia 648
client_print(players[idx], print_console, "%s", message) // Linia 649
}
}
Kawałek kodu i Linijka 96/115- color_chat.inl:
public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
new message[ 192 ];
switch(type)
{
case YELLOW: // Yellow
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}
vformat(message[1], 191, msg, 4);
// Make sure message is not longer than 192 character. Will crash the server.
message[189] = '^0';
new team, ColorChange, index, MSG_Type;
if(!id)
{
index = FindPlayer();
MSG_Type = MSG_ALL;
} else {
MSG_Type = MSG_ONE;
index = id;
}
team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]); // Linia 96
}
}
ShowColorMessage(id, type, message[])
{
message_begin(type, SayText, _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
message_begin(type, TeamInfo, _, id);
write_byte(id);
write_string(team);
message_end();
return 1; // Linia 115
}
AMXBans który używam to: http://amxx.pl/topic...-edit-23082012/
Poniżej daje .sma (wrazie czego) , proszę o pomoc.
Załączone pliki
Użytkownik consoN edytował ten post 27.04.2015 19:03


Dodatki SourceMod





amxbans_main.amxx









