[Duv]Sittimer
#1

Estou terminando meu FS e to querendo saber quais sгo os erros que nгo entendi
Код:
forward EventoAntigo();
public EventoAntigo();
{
  for (new x = 0; x < MAX_PLAYERS; x++ && IsPlayerConnected(x))
  if (GetPlayerVirtualWorld(x) == 3) return
  SendClientMessage(playerid, COR_DM, "|Admin Boot| Voce ainda esta no evento antigo.");
  SetTimer("EventoAntigo",6000000,1);
  Kick(x)
  return 1;
}
Erros:
Код:
C:\Users\john\Desktop\samp\Filterscripts\Registration.pwn(1325) : error 055: start of function body without function header
C:\Users\john\Desktop\samp\Filterscripts\Registration.pwn(1326) : error 010: invalid function or declaration
C:\Users\john\Desktop\samp\Filterscripts\Registration.pwn(1327) : error 010: invalid function or declaration
C:\Users\john\Desktop\samp\Filterscripts\Registration.pwn(1331) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
[/code :| :idea:
Reply
#2

Acho que vc nгo fechou uma chave.
Reply
#3

Linhas Do Erro?
Reply
#4

No public nгo usas o ';'. Depois tu estбs a fazer um 'loop' para que estбs a usar 'playerid'? O SendClientMessage coloca na mesma linha que o return. E para que tens um timer que chama a funзгo EventoAntigo dentro dessa funзгo? No 'Kick(x)' falta um ';'. Acho que foi tudo o que reparei.

Tipo agora nгo me vem nada a cabeзa mas devias criar uma funзгo que chamasse o EventoAntigo e depois um timer para kickar.

O EventoAntigo pode ser algo tipo:

pawn Код:
forward EventoAntigo();
public EventoAntigo()
{
  for(new i = 0;i < MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i)){
    if(GetPlayerVirtualWorld(i) == 3){
    return SendClientMessage(i, 0xAFAFAFAA, "|Admin Boot| Voce ainda esta no evento antigo.");
    }
    }
    }
    return 1;
}
Nгo testado. Anyway o loop estб a me fazer uma confusгo por isso se estiver algo errado desculpa.

Edit: Nгo devias estar a usar VirtualWorlds no loop...

Edit 2:

pawn Код:
forward EventoAntigo();
public EventoAntigo()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      if(GetPlayerVirtualWorld(i) == 3)
      {
        SendClientMessage(i, COR_DM, "|Admin Boot| Voce ainda esta no evento antigo.");
        Kick(i);
      }
    }
    return 1;
}
Й sу colocares o timer noutro sнtio.
Reply
#5

Ou isso:

pawn Код:
forward EventoAntigo();
public EventoAntigo();
{
  for (new x = 0; x < MAX_PLAYERS; x++ && IsPlayerConnected(x)) {
  if (GetPlayerVirtualWorld(x) == 3) {SendClientMessage(playerid, COR_DM, "|Admin Boot| Voce ainda esta no evento antigo.");SetTimer("EventoAntigo",6000000,1);Kick(x);return 1;}}
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)