Help server crash
#1

I inaugurated my server there a couple of weeks and it ca to the server falls for no reason, I recommend using the crash detect, and I got the following results:
Код:
[23:40:09] [debug] Server crashed while executing FV.amx
[23:40:09] [debug] AMX backtrace:
[23:40:09] [debug] #0 0000004b in ?? (32, 65, 84, 69, 32, 65, 77, 65, 78, 72, ... <8 arguments>) from FV.amx
[23:40:09] [debug] #1 0000004b in public cmd_kick () from FV.amx
[23:40:09] [debug] #2 native CallLocalFunction () from samp03svr
[23:40:09] [debug] #3 00005960 in public OnPlayerCommandText (5, 2722520) from FV.amx
FV.amx and my gamemode he and ZCMD and I do not use the public OnPlayerCommandText...

my /kick
Код:
CMD:kick(playerid, params[])
{
	new id,motivo[20];
	if(!(Player[playerid][pAdmin] >= 1) && !(Player[playerid][pFrente] >= 1) && !(Player[playerid][pPMERJ] >= 3) && !(Player[playerid][pCORE] >= 3) && !(Player[playerid][pBOPE] >= 3) && !(Player[playerid][pReporterLS] >= 3)) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando.");
   	if(sscanf(params,"us[128]",id,motivo)) return SendClientMessage(playerid, COR_ERRO,"Uso Correto: /kick [id][motivo]");
	if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
	if(Player[playerid][pBlockKick] == 1) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб com kick bloqueado.");
	if(Player[id][pAdmin] >= 1) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode kikar um administrador.");
	SendFormattedMessageToAll(COR_NEGATIVO, "INFO: %s foi kickado pelo %s %s | Motivo: %s", getPName(id), AccountName(playerid), getPName(playerid), motivo);
	Kick(id);
	return 1;
}
Can anyone help me?
Reply
#2

Yup, show your cmd_kick (cmd:kick or something) please.
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Yup, show your cmd_kick (cmd:kick or something) please.
Код:
CMD:kick(playerid, params[])
{
	new id,motivo[20];
	if(!(Player[playerid][pAdmin] >= 1) && !(Player[playerid][pFrente] >= 1) && !(Player[playerid][pPMERJ] >= 3) && !(Player[playerid][pCORE] >= 3) && !(Player[playerid][pBOPE] >= 3) && !(Player[playerid][pReporterLS] >= 3)) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando.");
   	if(sscanf(params,"us[128]",id,motivo)) return SendClientMessage(playerid, COR_ERRO,"Uso Correto: /kick [id][motivo]");
	if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO, "ERRO: Este jogador nгo estб conectado.");
	if(Player[playerid][pBlockKick] == 1) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк estб com kick bloqueado.");
	if(Player[id][pAdmin] >= 1) return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode kikar um administrador.");
	SendFormattedMessageToAll(COR_NEGATIVO, "INFO: %s foi kickado pelo %s %s | Motivo: %s", getPName(id), AccountName(playerid), getPName(playerid), motivo);
	Kick(id);
	return 1;
}
Reply
#4

Not certain, but motivo seems overflowable:
pawn Код:
if(sscanf(params,"us[20]",id,motivo))
Reply
#5

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Not certain, but motivo seems overflowable:
pawn Код:
if(sscanf(params,"us[20]",id,motivo))
The more I use the / kick and the server does not fall.

WHAT mean those here

[23:40:09] [debug] # 2 native CallLocalFunction () from samp03svr
[23:40:09] [debug] # 3 00,005,960 in public OnPlayerCommandText (5, 2722520) from FV.amx
[23:40:09] [debug] # 0 0000004b in ?? (32, 65, 84, 69, 32, 65, 77, 65, 78, 72, ... <8 arguments>) from FV.amx
Reply
#6

If you are using pawno, enter Build -> run options, and set "Run with these parameters" to
Quote:

-d3

Then you'll see exactly where does the error come from.

Quote:

OnPlayerCommandText (5, 2722520)

5 is the player id, 2722520 is the memory address of string passed, but it's really not informative.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)