[Ajuda] Erros EXP
#1

Me ajudem a resolver esses erros:

warnings
pawn Код:
(870) : warning 202: number of arguments does not match definition
(871) : warning 202: number of arguments does not match definition
Linhas 870 e 871:

pawn Код:
minUP[playerid] = DOF2_SetInt(file, "Relogioupm");
segUP[playerid] = DOF2_SetInt(file, "Relogioups");
Erro
pawn Код:
(959) : error 012: invalid function call, not a valid address
(959) : warning 215: expression has no effect
(959) : error 001: expected token: ";", but found ")"
(959) : error 029: invalid expression, assumed zero
(959) : fatal error 107: too many error messages on one line
Linha 959:

pawn Код:
DOF2_SetInt(ReturnFileUser(playerid),"EXP", pEXP(playerid));
Linhas de 955 atй a 959:

pawn Код:
DOF2_SetInt(ReturnFileUser(playerid),"Level",GetPlayerScore(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"Dinheiro",GetPlayerMoney(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"Admin Level",PlayerDados[playerid][pAdmin]);
        DOF2_SetInt(ReturnFileUser(playerid),"Skin",GetPlayerSkin(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"EXP", pEXP(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"VIP", PlayerDados[playerid][pVIP]);
        DOF2_SaveFile();

Topo do GM

pawn Код:
// Enum dos dados
enum pDados
{
    pAdmin,
    pVIP,
    pEXP
};
Reply
#2

pawn Код:
DOF2_SetInt(ReturnFileUser(playerid),"EXP", PlayerInfo[playerid][pEXP]);
Reply
#3

pawn Код:
minUP[playerid] = DOF2_GetInt(file, "Relogioupm");
segUP[playerid] = DOF2_GetInt(file, "Relogioups");
pawn Код:
DOF2_SetInt(ReturnFileUser(playerid),"EXP", PlayerDados[playerid][pEXP]);
Reply
#4

humildade estou usando seu sistema oks ?
Mais tipo precisa colocar na enum pEXP la em cima ?

Linha 959 resolveu '-'
eos warnings tbm
Jaja posto aki os restantes do errs
Reply
#5

Quote:
Originally Posted by Bruninho_step
Посмотреть сообщение
humildade estou usando seu sistema oks ?
Mais tipo precisa colocar na enum pEXP la em cima ?

Linha 959 resolveu '-'
eos warnings tbm
Jaja posto aki os restantes do errs
Nгo precisa pois ela jб foi criada no enumerador.
Reply
#6

Seguinte deu esses erros:

pawn Код:
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1313) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1314) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1315) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1318) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1319) : error 004: function "Up" is not implemented
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1325) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1326) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1327) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1328) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1329) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1330) : error 017: undefined symbol "i"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1334) : warning 217: loose indentation
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1346) : warning 217: loose indentation
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1346) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1346) : error 004: function "ChatAFK" is not implemented
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1347) : warning 217: loose indentation
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1357) : warning 217: loose indentation
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1357) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1357) : error 004: function "AtualizarChatBubble" is not implemented
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1361) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1361) : warning 215: expression has no effect
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1361) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1361) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Bruninho\Desktop\Serv\gamemodes\Serv.pwn(1361) : fatal error 107: too many error messages on one line

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


25 Errors.


Linha 1313 atй 1361:

pawn Код:
public RelogioUP(playerid)
{
    new string[256];
    if(segUP[playerid] == 0 && minUP[playerid] == 0)
    {
        new file[156],Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid,Name,sizeof(Name));
        format(file,sizeof(file),FileUsers,Name);
        if(!DOF2_FileExists(ReturnFileUser(playerid)))
        {
            if(AFK[playerid] == 0) {
                DOF2_SetInt(ReturnFileUser, "Tempo", DOF2_SetInt(ReturnFileUser, "Tempo")+1);
                //====== [EXP] ======
                if(DOF2_SetInt(ReturnFileUser, "Tempo") >= 1)
                {
                    DOF2_SetInt(ReturnFileUser, "EXP", DOF2_SetInt(ReturnFileUser, "EXP")+1);
                    format(string, sizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",DOF2_SetInt(ReturnFileUser, "EXP"));
                    PlayerPlaySound(playerid, 1057, 0, 0, 0);
                    GameTextForPlayer(playerid, "~w~UP!", 3000, 6);
                    SendClientMessage(playerid, 0x75EA00AA, string);
                    DOF2_SetInt(ReturnFileUser, "Tempo",0);
                }
                if(DOF2_SetInt(ReturnFileUser, "EXP") >=5) {
                    DOF2_SetInt(ReturnFileUser, "Level", DOF2_SetInt(ReturnFileUser, "Level")+1);
                    SetPlayerScore(playerid,DOF2_SetInt(ReturnFileUser, "Level"));
                    format(string, sizeof(string), "| UP | Vocк juntou 5 experiкncias, e ganhou +1 level. (Level: %d) ",DOF2_SetInt(ReturnFileUser, "Level"));
                    SendClientMessage(playerid, 0x75EA00AA, string);
                    PlayerPlaySound(playerid, 1057, 0, 0, 0);
                    DOF2_SetInt(ReturnFileUser, "EXP",0);
                    Up(playerid);
                }
            }
            else {
                SendClientMessage(playerid, Vermelho, "[ANTI - AFK] Vocк estб afk, e nгo recebeu uma experiкncia!");
            }
            if(PlayerAfkTicks[i] == MAX_IDLE_TIME*60) {
            AFK[i]= 1;
            SendClientMessage(i, Amarelo, "[ANTI - AFK] Vocк foi bloqueado(a) de upar!");
            TextDrawHideForPlayer(i,UPRelogio[i]);
            TextDrawShowForPlayer(i,AfkText);
            TextDrawShowForPlayer(i,AfkBackText);

        }
    }
    if(segUP[playerid] == -1) {
        if(minUP[playerid] == 0)
            minUP[playerid] = 10;
        segUP[playerid] = 59;
        minUP[playerid]--;
    }
    format(string, sizeof(string), "~w~UP~b~: ~w~%02d~b~:~w~%02d", minUP[playerid],segUP[playerid]);
    TextDrawSetString(UPRelogio[playerid],string);
    segUP[playerid] --;
    return 1;
}

public ChatAFK()
    {
    for(new x=0; x < MAX_PLAYERS; x++)
    {
        if(AFK[x] == 1)
        {
                SetPlayerChatBubble(x, "• Jogador AFK •", 0xEDFF87AA, 100.0, 10000);
            }
        }
    }
   
public AtualizarChatBubble()
{
    for(new x=0; x < MAX_PLAYERS; x++)
    {
        if(pAdmin[x] == 1)
Reply
#7

DOF2_SetInt - Seta no arquivo
DOF2_GetInt - Geta (Pega) no arquivo

Vocк estб confundindo as coisas...

pawn Код:
DOF2_SetInt(ReturnFileUser, "Tempo", DOF2_GetInt(ReturnFileUser, "Tempo")+1);
                //====== [EXP] ======
                if(DOF2_GetInt(ReturnFileUser, "Tempo") >= 1)
                {
                    DOF2_SetInt(ReturnFileUser, "EXP", DOF2_GetInt(ReturnFileUser, "EXP")+1);
                    format(string, sizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",DOF2_SetInt(ReturnFileUser, "EXP"));
                    PlayerPlaySound(playerid, 1057, 0, 0, 0);
                    GameTextForPlayer(playerid, "~w~UP!", 3000, 6);
                    SendClientMessage(playerid, 0x75EA00AA, string);
                    DOF2_SetInt(ReturnFileUser, "Tempo",0);
                }
                if(DOF2_GetInt(ReturnFileUser, "EXP") >=5) {
                    DOF2_SetInt(ReturnFileUser, "Level", DOF2_GetInt(ReturnFileUser, "Level")+1);
                    SetPlayerScore(playerid,DOF2_SetInt(ReturnFileUser, "Level"));
                    format(string, sizeof(string), "| UP | Vocк juntou 5 experiкncias, e ganhou +1 level. (Level: %d) ",DOF2_SetInt(ReturnFileUser, "Level"));
                    SendClientMessage(playerid, 0x75EA00AA, string);
                    PlayerPlaySound(playerid, 1057, 0, 0, 0);
                    DOF2_SetInt(ReturnFileUser, "EXP",0);
                    Up(playerid);
                }
Reply
#8

Continua os erro
Reply
#9

Se vocк possui ReturnFileUser(playerid) porque estб usando apenas ReturnFileUser ?
Logo essa formataзгo tambйm nгo й necessбria:
pawn Код:
format(file,sizeof(file),FileUsers,Name);
Vocк nгo utiliza file em nenhuma linha pelo que vi.
Delete-a e estude um pouco mais DOF2 pois como a humildadeforever postou, vocк estб confundindo as coisas.

Abrзs.
Reply
#10

Eu mechia com dini, estou aprendendo DOF2 agora...
por favor me ajudem a resolver, me mandem o codigo identado sem erros pra eu estudar e nao vim aqi mais com o mesmo assunto
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)