[Ajuda] Qual erro nesse code?
#9

Fuck, foi й que eu coloquei a variavel, no lugar errado, enfim
agora tб dando outro erro, mas nгo sei como resolver. pode me ajudar?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new arquivo[40], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, 32);
    format(arquivo, 40, "Contas/%s.ini", name);
    if(dialogid == DIALOG_REGISTRO)
    {
        if(!strval(inputtext))
        {
            ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite apenas nъmeros!\nDigite sua senha novamente para se registrar!", "Confirma", "Cancelar");
            return 1;
        }
        if(!response)
        {
            Kick(playerid);
            return 1;
        }
        else
        {
            Player[playerid][Senha] = strval(inputtext);
            DOF2_CreateFile(arquivo);

            DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
            DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
            DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
            DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
            DOF2_SaveFile();
            ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк se cadastrou, agora й sу logar com sua senha registrada!", "Confirma", "Cancelar");
        }
    }
    if(dialogid == DIALOG_LOGAR)
    {
        if(!strval(inputtext))
            ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Digite apenas nъmeros!\nDigite sua senha cadastrada para logar!\nSe errar 5 vezes sua conta serб banida!", "Confirma", "Cancelar");
            return 1;
        }
        if(!response)
        { //Caso ele clicar em cancelar, irб retornar ao playerid KICK
            Kick(playerid);
            return 1;
        }
        else
        {
            Player[playerid][Senha] = DOF2_GetInt(arquivo, "Senha");
            if(strval(inputtext) == Player[playerid][Senha])
            {
                Player[playerid][Matou] = DOF2_GetInt(arquivo, "Matou");
                Player[playerid][Skin] = DOF2_GetInt(arquivo, "Skin");
                Player[playerid][Morreu] = DOF2_GetInt(arquivo, "Morreu");
                Player[playerid][Dinheiro] = DOF2_GetInt(arquivo, "Dinheiro");
                GivePlayerMoney(playerid, Player[playerid][Dinheiro]);
                SetPlayerSkin(playerid, Player[playerid][Skin]);
                SpawnPlayer(playerid);
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк digitou sua senha errado, digite-a novamente para logar!\nSe errar 5 vezes sua conta serб banida!", "Confirma", "Cancelar");
                Erro[playerid]++;
                if(Erro[playerid] == 5)
                {
                    SendClientMessage(playerid, -1, "[SISTEMA] Sua conta estб banida por errar 5 vezes a sua senha, contacte um administrador para retirar seu banimento!");
                    Ban(playerid);
                    return 1;
                }
            }
        }
    }
    return 1;
}
ERROS:
PHP код:
warning 209: function "OnDialogResponse" should return a value
error 010
invalid function or declaration 
mas no code tem um retorno, isso que nгo estou entendendo.
Reply


Messages In This Thread
Qual erro nesse code? - by LucaAllexandre - 17.11.2013, 20:51
Re: Qual erro nesse code? - by iDreak - 17.11.2013, 20:57
Re: Qual erro nesse code? - by LucaAllexandre - 17.11.2013, 20:58
Re: Qual erro nesse code? - by Gii - 17.11.2013, 20:59
Re: Qual erro nesse code? - by LucaAllexandre - 17.11.2013, 21:03
Re: Qual erro nesse code? - by Gii - 17.11.2013, 21:07
Re: Qual erro nesse code? - by LucaAllexandre - 17.11.2013, 21:11
Re: Qual erro nesse code? - by Gii - 17.11.2013, 21:26
Re: Qual erro nesse code? - by LucaAllexandre - 17.11.2013, 21:31
Re: Qual erro nesse code? - by iTzDemon - 17.11.2013, 21:52

Forum Jump:


Users browsing this thread: 4 Guest(s)