[Ajuda] erro
#1

Bom meu sistema de ban estб dando erro nas stock vo postar abaixo se alguйm puder me ajudar a corrigir agradeзo.

pawn Код:
C:\Users\Lucas\Desktop\Sprite Gaming - RPG\gamemodes\SG.pwn(403) : error 017: undefined symbol "playerid"
C:\Users\Lucas\Desktop\Sprite Gaming - RPG\gamemodes\SG.pwn(412) : error 017: undefined symbol "playerid"
C:\Users\Lucas\Desktop\Sprite Gaming - RPG\gamemodes\SG.pwn(416) : warning 209: function "UnBanIP" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Codigo marquei com //erro as linhas onde estб os erros:

pawn Код:
stock UnBanNick(Nome[])
{
    new mStr[128];
    format(mStr, 128, LOCALBANNICK, Nome);
    if(!DOF2_FileExists(mStr))return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");//erro
    DOF2_RemoveFile(mStr);
    format(mStr, 128, "Aviso- O nick %s acaba de ser desbanido.",Nome);
    return SendClientMessageToAll(-1, mStr);
}
stock UnBanIP(mIP[])
{
    new mStr[128];
    format(mStr, 128, LOCALBANIP, mIP);
    if(!DOF2_FileExists(mStr))return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");//erro
    DOF2_RemoveFile(mStr);
    format(mStr, 128, "-Aviso- O ip %i acaba de ser desbanido.", mIP);
    SendClientMessageToAll(-1, mStr);
}//erro
Aqui estб o comando /ban e /desban:

pawn Код:
CMD:ban(mPlayer, mParams[])
{
    new mPlayerID, mMotivo[128];
    if(sscanf(mParams, "us[128]", mPlayerID, mMotivo))//erro
    {
        return SendClientMessage(mPlayer, -1, "/ban (id/name) (motivo)");
    }
    return BanId(mPlayerID, mMotivo);
}

CMD:desban(mPlayer, mParams[])
{
    if(isnull(mParams))
    {
        return SendClientMessage(mPlayer, -1, "/desban (ip/nick)");
    }

    new mNum, i;
    for(; i != strlen(mParams); ++i)
    {
        if(mParams[i] == '.' || (mParams[i] >= '0' && mParams[i] <= '9'))
        {
            ++mNum;
        }
    }
    if(mNum >= 5)
    {
        UnBanIP(mParams);
    }
    else
    {
        UnBanNick(mParams);
    }
    return 1;
}
Reply


Messages In This Thread
erro - by lucaskill66 - 10.10.2012, 17:51
Re: erro - by Delete_ - 10.10.2012, 18:04
Re: erro - by lucaskill66 - 10.10.2012, 18:17
Re: erro - by mau.tito - 10.10.2012, 18:22
Re: erro - by Life Advanced - 10.10.2012, 18:40
Re: erro - by Bufige - 10.10.2012, 19:18
Re: erro - by Metropole RP - 10.10.2012, 19:22
Re: erro - by lucaskill66 - 10.10.2012, 19:30
Re: erro - by Bufige - 10.10.2012, 19:38
Re: erro - by lucaskill66 - 10.10.2012, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)