14.04.2013, 11:20
Ta dando esse erro ai no meu /anuncio
LINHA COM ERRO
OS ERROS
O COMANDO INTEIRO
LINHA COM ERRO
pawn Код:
if(GetTickCount() - FloodAn[playerid] < 80000)
pawn Код:
(17917) : error 017: undefined symbol "FloodAn"
(17917) : warning 215: expression has no effect
(17917) : error 001: expected token: ";", but found "]"
(17917) : error 029: invalid expression, assumed zero
(17917) : fatal error 107: too many error messages on one line
pawn Код:
if(strcmp(cmd, "/anuncio", true) == 0 || strcmp(cmd, "/an", true) == 0)
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Voce nao esta logado!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[126];
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: (/an)uncio [Texto do Anuncio]");
return 1;
}
new payout = idx * 10;
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "* Voce usou %d caracteres que custou $%d, voce nao possui essa grana.", offset, payout);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
if(GetTickCount() - FloodAn[playerid] < 80000)
{
format(string, sizeof(string), " Espere %d segundos para um novo anuncio!",80-(GetTickCount() - FloodAn[playerid])/1000);
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
format(string, sizeof(string), "Anъncio Global: %s, por: %s (%s), ID %d, Celular %d.",result, sendername,NomeORG(playerid),playerid,PlayerInfo[playerid][pPnumber]);
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
SendClientMessageToAll(GetPlayerColor(playerid),string);
format(string, sizeof(string), "~r~Pagou $%d~n~~w~Mensagem continha: %d Caracteres", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
FloodAn[playerid] = GetTickCount();
return 1;
}