[Ajuda] Ajuda com erros
#1

Eae galera meu comando de /bantempo ta dando erros
pawn Код:
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11647) : error 047: array sizes do not match, or destination array is too small
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11653) : error 012: invalid function call, not a valid address
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11653) : warning 215: expression has no effect
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11653) : error 001: expected token: ";", but found ")"
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11653) : error 029: invalid expression, assumed zero
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11653) : fatal error 107: too many error messages on one line

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


5 Errors.
alguem me ajuda a arrumar esses erros rep pra qm ajudar

pawn Код:
new giveplayerid[90];
new tmp[90];
new Returnn;
    if(strcmp(cmd, "/banirtempo", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, Vermelho, "USE: /bantemp [id] [dias] [motivo]");
                return true;
            }
                        giveplayerid = Returnn(tmp);
            if(pAdmin[playerid] == 5)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(pAdmin[playerid] == 5)
                        {
                            SendClientMessage(playerid, Vermelho, "Vocк nгo pode banir este admin!");
                            return true;
                        }
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        tmp = strtok(cmdtext, idx);
                        if(!strlen(tmp))
                        {
                            SendClientMessage(playerid, Vermelho, "USE: /bantemp [id] [dias] [motivo]");
                            return true;
                        }
                        new diasban = strval(tmp);
                        new length = strlen(cmdtext);
                        while ((idx < length) && (cmdtext[idx] <= ' '))
                        {
                            idx++;
                        }
                        new offset = idx;
                        new result[64];
                        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                        {
                            result[idx - offset] = cmdtext[idx];
                            idx++;
                        }
                        result[idx - offset] = EOS;
                        if(!strlen(result))
                        {
                            SendClientMessage(playerid, Vermelho, "USE: /banirtempo [id] [dias] [motivo]");
                            return true;
                        }
                        getdate(year, month, day);
                        if(diasban > 9999)
                        {
                            SendClientMessage(playerid, Vermelho, "[ERRO] Vocк definiu muitos dias!");
                            return 1;
                        }
                        format(string, sizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s (%d-%d-%d)", giveplayer, diasban, sendername, (result),day,month,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s", giveplayer, diasban, sendername, (result));
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[giveplayerid][pDiaBanTemp] = day+diasban;
                        PlayerInfo[giveplayerid][pMesBanTemp] = month;
                        PlayerInfo[giveplayerid][pAnoBanTemp] = year;
                        for(new dias = 1; dias < diasban; dias++)
                        {
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 1 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 2 && PlayerInfo[giveplayerid][pDiaBanTemp] > 28)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 28;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 3 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 4 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 5 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 6 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 7 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 8 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 9 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 10 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 11 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] == 12 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(PlayerInfo[giveplayerid][pMesBanTemp] > 12)
                            {
                                PlayerInfo[giveplayerid][pMesBanTemp] -= 12;
                                PlayerInfo[giveplayerid][pAnoBanTemp]++;
                            }
                        }
                        OnPlayerSave(giveplayerid);
                        TextDrawShowForPlayer(giveplayerid, TextBan[giveplayerid]);
                        BanTemp(giveplayerid, result, PlayerName(playerid));
                        return true;
                    }
                }//not connected
            }
            else
            {
                QQIssoNovinha;
            }
        }
        return true;
    }
Reply
#2

PHP код:
new giveplayerid[90];
new 
tmp[90];
new 
Returnn;
    if(
strcmp(cmd"/banirtempo"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridVermelho"USE: /bantemp [id] [dias] [motivo]");
                return 
true;
            }
                        
giveplayerid Returnn(tmp);
            if(
pAdmin[playerid] == 5)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(
pAdmin[playerid] == 5)
                        {
                            
SendClientMessage(playeridVermelho"Vocк nгo pode banir este admin!");
                            return 
true;
                        }
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
tmp strtok(cmdtextidx);
                        if(!
strlen(tmp))
                        {
                            
SendClientMessage(playeridVermelho"USE: /bantemp [id] [dias] [motivo]");
                            return 
true;
                        }
                        new 
diasban strval(tmp);
                        new 
length strlen(cmdtext);
                        while ((
idx length) && (cmdtext[idx] <= ' '))
                        {
                            
idx++;
                        }
                        new 
offset idx;
                        new 
result[64];
                        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                        {
                            
result[idx offset] = cmdtext[idx];
                            
idx++;
                        }
                        
result[idx offset] = EOS;
                        if(!
strlen(result))
                        {
                            
SendClientMessage(playeridVermelho"USE: /banirtempo [id] [dias] [motivo]");
                            return 
true;
                        }
                        
getdate(yearmonthday);
                        if(
diasban 9999)
                        {
                            
SendClientMessage(playeridVermelho"[ERRO] Vocк definiu muitos dias!");
                            return 
1;
                        }
                        
format(stringsizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s (%d-%d-%d)"giveplayerdiasbansendername, (result),day,month,year);
                        
BanLog(string);
                        
format(stringsizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s"giveplayerdiasbansendername, (result));
                        
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        
PlayerInfo[giveplayerid][pDiaBanTemp] = day+diasban;
                        
PlayerInfo[giveplayerid][pMesBanTemp] = month;
                        
PlayerInfo[giveplayerid][pAnoBanTemp] = year;
                        for(new 
dias 1dias diasbandias++)
                        {
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 28)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 28;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == 10 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == 11 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] == 12 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
                            {
                                
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
                                
PlayerInfo[giveplayerid][pMesBanTemp]++;
                            }
                            if(
PlayerInfo[giveplayerid][pMesBanTemp] > 12)
                            {
                                
PlayerInfo[giveplayerid][pMesBanTemp] -= 12;
                                
PlayerInfo[giveplayerid][pAnoBanTemp]++;
                            }
                        }
                        
OnPlayerSave(giveplayerid);
                        
TextDrawShowForPlayer(giveplayeridTextBan[giveplayerid]);
                        
BanTemp(giveplayeridresultPlayerName(playerid));
                        return 
true;
                    }
                }
//not connected
            
}
        }
        return 
true;
    } 
Reply
#3

ta quais delete

pawn Код:
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11649) : error 047: array sizes do not match, or destination array is too small
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11655) : error 012: invalid function call, not a valid address
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11655) : warning 215: expression has no effect
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11655) : error 001: expected token: ";", but found ")"
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11655) : error 029: invalid expression, assumed zero
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(11655) : fatal error 107: too many error messages on one line

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


5 Errors.
pawn Код:
tmp = strtok(cmdtext, idx);// linha do erros

giveplayerid = Returnn(tmp);// linha dos erros
Reply
#4

Desisto rsrsrsrsrs
Reply
#5

Nuss'-' que viagem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)