21.07.2011, 21:24
Bom, tentei criar um anti flood, porйm sou nгo consegui (este й o primeiro sistema 100% criado por mim, entгo queria saber onde estб o erro).
Topo GM:
Publics:
Erros:
Topo GM:
pawn Код:
new PermTuto;
new PermTutopl;
forward PermTutopl(playerid); // linha 38
pawn Код:
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(PermTuto[playerid] == 0)/*Linha do erro || 2990 */
{
if(IsPlayerConnected(playerid))
{
PermTuto[playerid] = 1;
SetTimerEx("PermTutopl",10000,false,"i",playerid);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /relatorio [texto]");
return 1;
}
if(PlayerInfo[playerid][pVIP] == 1)
{
format(string, sizeof(string), "[RELATУRIO VIP Bronze] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_GREEN,string);
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
format(string, sizeof(string), "[RELATУRIO VIP Silver] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_PINK,string);
}
else if(PlayerInfo[playerid][pVIP] == 3)
{
format(string, sizeof(string), "[RELATУRIO VIP Gold] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_BLUE,string);
}
else
{
format(string, sizeof(string), "[RELATУRIO]: %s (%d): %s", sendername,playerid, (result));
SendTesterAdminMessage(COLOR_RED,string);
SendClientMessage(playerid, COLOR_GREEN, "Seu Relatуrio Foi Enviado Aos Admins e Testers Online.");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /relatorio %s",d,m,y,h,mi,s,sendername, (result));
CommandLog(string);
ReportLog(string);
}
}
}
return 1;
}
pawn Код:
public PermTutopl(playerid)
{
PermTuto[playerid] = 0;
}
Quote:
Compilando Roleplay.pwn... D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(3 : error 021: symbol already defined: "PermTutopl" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(16497) : warning 217: loose indentation // Mal identado :S D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 028: invalid subscript (not an array or too many subscripts): "PermTuto" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : warning 215: expression has no effect D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 001: expected token: ";", but found "]" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 029: invalid expression, assumed zero D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |