[Ajuda] include FloodControl
#1

Tava tentando adicionar a include do RoacH` FloodControl mas ta dando alguns erros na public OnPlayerDisconnect sera porque?.

public onplayerdisconnect da include
pawn Код:
public OnPlayerDisconnect(playerid, reason) {
    if(GetPVarInt(playerid, #blockmessage) == 1) return false;
    return flood_controlOnPlayerDisconnect(playerid, reason);
}
public do gm
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new caller = Mobile[playerid];
    OnPlayerSave(playerid);
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  COLOR_BLUE, "A Ligacao caiu...");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    BusrouteEast[playerid][0] = 0;
    BusrouteWest[playerid][0] = 0;
    if(PlayerInfo[playerid][pAdmin] == 1356)
    {
        format(gstring, sizeof(gstring), "~p~%s: ~r~OFF", PlayerName(playerid));
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GameTextForPlayer(i, gstring , 1000, 1);
            }
        }
    }
}
ERROS
Quote:

C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 43) : error 025: function heading differs from prototype
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 45) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 46) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 47) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 4 : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 49) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 50) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 51) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 52) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 59) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 62) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 63) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 65) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 67) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 6 : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 69) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 70) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 72) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 74) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 76) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 7 : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 80) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 82) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 84) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 86) : error 017: undefined symbol "playerid"
C:\Users\lucass\Desktop\GMS\GM\gamemodes\gm.pwn(78 8 : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply
#2

PHP код:

public OnPlayerDisconnect(playeridreason)
{
    new 
caller Mobile[playerid];
    
OnPlayerSave(playerid);
    if(
caller != 255)
    {
        if(
caller 255)
        {
            
SendClientMessage(caller,  COLOR_BLUE"A Ligacao caiu...");
            
CellTime[caller] = 0;
            
CellTime[playerid] = 0;
            
Mobile[caller] = 255;
        }
        
Mobile[playerid] = 255;
        
CellTime[playerid] = 0;
    }
    
BusrouteEast[playerid][0] = 0;
    
BusrouteWest[playerid][0] = 0;
    if(
PlayerInfo[playerid][pAdmin] == 1356)
    {
        
format(gstringsizeof(gstring), "~p~%s: ~r~OFF"PlayerName(playerid));
        for(new 
i=0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                
GameTextForPlayer(igstring 10001);
            }
        }
    }
    return 
1;

Tente isto ..
Reply
#3

continua os mesmos erros man.
Reply
#4

Cara esses erros sгo de { que foram abertas e nгo foram fechadas com } !
Revise suas ultimas alteraзхes...
Reply
#5

so quando eu uso a include que da esses erros.
Reply
#6

Pode ser que seja na include a falta de algum "}"
Reply
#7

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Pode ser que seja na include a falta de algum "}"
Creio que nao
https://sampforum.blast.hk/showthread.php?tid=353344
Reply
#8

Entгo й algo no seu cуdigo :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)