[Ajuda] ZCMD
#1

fiz a conversгo de todos os comandos de meu gm para zcmd porem apareceram alguns erros

esse e o primeiro cmd do gm creio q acontecera com os d+ tbm
pawn Код:
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 029: invalid expression, assumed zero
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 017: undefined symbol "cmd_excluirfamilia"
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 029: invalid expression, assumed zero
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
CMD:excluirfamilia(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1338) return MSGPLAYER(playerid, COLOR_GRAD3, "Vocк nгo possui autorizaзгo para usar esse comando.");
    tmp = strtok(cmd, idx);
    if(!strlen(tmp)) return MSGPLAYER(playerid, COLOR_GRAD3, "USE: /excluirfamilia [id da familia no /familias].");
    new autorizado;
    autorizado = strval(tmp);
    if(autorizado < 0 || autorizado > 9) return MSGPLAYER(playerid, COLOR_GRAD3, "IDs entre 0 e 9.");
    for(new p = 0; p<MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            if(p != INVALID_PLAYER_ID)
            {
                if(GetIDFamilia(p) == autorizado)
                {
                    new frasinha[256];
                    format(frasinha, sizeof(frasinha), "O Admin %s fechou sua famнlia.", PlayerName(playerid));
                    MSGPLAYER(p, COLOR_YELLOW, frasinha);
                }
            }
        }
    }
    ExcluirFamilia(autorizado);
    return 1;
}
Reply
#2

procure no seu gm se nгo existe outro:

excluirfamilia
Reply
#3

nao existee...
Reply
#4

Quote:
Originally Posted by Programador_Macabro
Посмотреть сообщение
fiz a conversгo de todos os comandos de meu gm para zcmd porem apareceram alguns erros

esse e o primeiro cmd do gm creio q acontecera com os d+ tbm
pawn Код:
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 029: invalid expression, assumed zero
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 017: undefined symbol "cmd_excluirfamilia"
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : error 029: invalid expression, assumed zero
C:\Users\Windows 7\Desktop\Server\Brasil SampForever v3.1b\gamemodes\BSF3.1b.pwn(19624) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
CMD:excluirfamilia(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1338) return MSGPLAYER(playerid, COLOR_GRAD3, "Vocк nгo possui autorizaзгo para usar esse comando.");
    tmp = strtok(cmd, idx);
    if(!strlen(tmp)) return MSGPLAYER(playerid, COLOR_GRAD3, "USE: /excluirfamilia [id da familia no /familias].");
    new autorizado;
    autorizado = strval(tmp);
    if(autorizado < 0 || autorizado > 9) return MSGPLAYER(playerid, COLOR_GRAD3, "IDs entre 0 e 9.");
    for(new p = 0; p<MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            if(p != INVALID_PLAYER_ID)
            {
                if(GetIDFamilia(p) == autorizado)
                {
                    new frasinha[256];
                    format(frasinha, sizeof(frasinha), "O Admin %s fechou sua famнlia.", PlayerName(playerid));
                    MSGPLAYER(p, COLOR_YELLOW, frasinha);
                }
            }
        }
    }
    ExcluirFamilia(autorizado);
    return 1;
}
Deve ser por vocк estar usando STRTOK com ZCMD... й Usado SSCANF com ZCMD
Reply
#5

god! strock e zcmd, lol!
Reply
#6

pawn Код:
CMD:excluirfamilia(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1338) return MSGPLAYER(playerid, COLOR_GRAD3, "Vocк nгo possui autorizaзгo para usar esse comando.");
    if(isnull(params)) return MSGPLAYER(playerid, COLOR_GRAD3, "USE: /excluirfamilia [id da familia no /familias].");
    if(params < 0 || params > 9) return MSGPLAYER(playerid, COLOR_GRAD3, "IDs entre 0 e 9.");
    for(new p = 0; p<MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            if(p != INVALID_PLAYER_ID)
            {
                if(GetIDFamilia(p) == params)
                {
                    new frasinha[256];
                    format(frasinha, sizeof(frasinha), "O Admin %s fechou sua famнlia.", PlayerName(playerid));
                    MSGPLAYER(p, COLOR_YELLOW, frasinha);
                }
            }
        }
    }
    ExcluirFamilia(params);
    return 1;
}
Acho que vai funcionar
Reply
#7

no caso como faзo a conversao de strock para SSCANF ?
Reply
#8

Testa o meu CMD que eu postei acima
Reply
#9

pawn Код:
CMD:excluirfamilia(playerid, params[])
{
    new FamiliaID;
    if(PlayerInfo[playerid][pAdmin] < 1338) return MSGPLAYER(playerid, COLOR_GRAD3, "Vocк nгo possui autorizaзгo para usar esse comando.");
    if(sscanf(params, "d", FamiliaID)) return MSGPLAYER(playerid, COLOR_GRAD3, "USE: /excluirfamilia [id da familia no /familias].");
    if(FamiliaID < 1 || FamiliaID > 9)) return MSGPLAYER(playerid, COLOR_GRAD3, "ID Invбlido - 0 a 9!");
    for(new p = 0; p<MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            if(p != INVALID_PLAYER_ID)
            {
                if(GetIDFamilia(p) == autorizado)
                {
                    new frasinha[256];
                    format(frasinha, sizeof(frasinha), "O Admin %s fechou sua famнlia.", PlayerName(playerid));
                    MSGPLAYER(p, COLOR_YELLOW, frasinha);
                }
            }
        }
    }
    ExcluirFamilia(autorizado);
    return 1;
}
Ficaria assim se nгo me engano.
Reply
#10

ok irei testar mas creio q esse problema acontecera em todos os outros cmds do gm


como faзo a conversao de strock para SSCANF ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)