08.12.2011, 10:47
(11) : warning 202: number of arguments does not match definition
(11) : error 017: undefined symbol "playerid"
(14) : warning 235: public function lacks forward declaration (symbol "ping")
(22) : warning 209: function "ping" should return a value
(35) : warning 209: function "OnPlayerCommandText" should return a value
Linha 11 ( linha do settimer ) :
Linha 14 ( Linha da public ) :
Linha 22: ultima linha do cуdigo anterior ( } )
Linha 35 ( ultimo } do cуdigo) :
(11) : error 017: undefined symbol "playerid"
(14) : warning 235: public function lacks forward declaration (symbol "ping")
(22) : warning 209: function "ping" should return a value
(35) : warning 209: function "OnPlayerCommandText" should return a value
Linha 11 ( linha do settimer ) :
pawn Код:
public OnFilterScriptInit()
{
SetTimer("ping", 2000, true, "d", playerid);
return 1;
}
pawn Код:
public ping(playerid)
{
if(GetPlayerPing(playerid) >= MaxPing) // <<<<
{
SendClientMessage(playerid, -1, "Vocк foi kickado por ter ping muito alto");
Kick(playerid);
return 1;
}
}
Linha 35 ( ultimo } do cуdigo) :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/maxping"))
{
new tmp[24], idx; tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, -1, "/maxping [numero]");
MaxPing = strval(tmp);
return 1;
}
}