[Ajuda] Dialog
#1

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if (response)
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""WHITE"Registo",""RED"Introduziste uma palavra-passe com caracteres invalidos!\n"WHITE"Escreve uma palavra-passe para te registares.","Registar","Sair");
                }

                if(INI_Open(getINI(playerid))) {
                INI_WriteString("Password",inputtext);
                INI_WriteInt("Score",1);
                INI_WriteInt("Cash",5000);
                INI_WriteInt("Admin",0);


                INI_Save();
                INI_Close();
               
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""WHITE"Entrada",""WHITE"Escreve a tua palavra-passe para entrares.","Entrar","Sair");
               
                               
               
                ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_INPUT, ""WHITE"Qual й o teu sexo ?",""WHITE"Masculino\nFeminino","Seguinte","Sair");
            }
        }
    }
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Entrada",""RED"Introduziste uma palavra-passe com caracteres invalidos!\n"WHITE"Escreve a tua palavra-passe para te entrares.","Entrar","Sair");
                }

                if(INI_Open(getINI(playerid))) {
                INI_ReadString(PlayerInfo[playerid][pPass],"Password",20);

                if(strcmp(inputtext,PlayerInfo[playerid][pPass],false)) {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Entrada",""RED"Introduziste a palavra-passe errada.\n"WHITE"Escreve a tua palavra-passe para te entrares.","Entrar","Sair");
                }

                SetPlayerScore( playerid, INI_ReadInt("Score" ) );
                ResetPlayerMoney( playerid );
                GivePlayerMoney( playerid, INI_ReadInt( "Cash" ) );
                PlayerInfo[playerid][pAdmin] = INI_ReadInt("Admin");
                INI_Close();
                }
            }
        }
    }
        case DIALOG_SEXO:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_INPUT, "Qual й o teu sexo ?","Masculino\nFeminino","Seguinte","Sair");
            }
            else if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        SendClientMessage(playerid, 0xFFFFFFFF, "Portanto, es do sexo masculino.");
                        PlayerStat[playerid][pSexo] = 1;
                        SetPlayerSkin(playerid, 50);
                    }
                    case 1:
                    {
                        SendClientMessage(playerid, 0xFFFFFFFF, "Portanto, es do sexo feminino.");
                        PlayerStat[playerid][pSexo] = 0;
                        SetPlayerSkin(playerid, 191);
                    }
                }
            }
        }
    }
    return 1;
}
Erro na linha:
pawn Код:
case DIALOG_SEXO:

Erros:
pawn Код:
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : warning 217: loose indentation
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : error 014: invalid statement; not in switch
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : warning 215: expression has no effect
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : error 001: expected token: ";", but found ":"
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : error 029: invalid expression, assumed zero
C:\Users\NOOBRE\Desktop\lol\gamemodes\lol-pt.pwn(1325) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
[Ajuda] Dialog - by noobre - 29.06.2012, 23:58
Re: [Erros] Dialog - by .FuneraL. - 30.06.2012, 00:00
Re: [Erros] Dialog - by cJMaster_ - 30.06.2012, 00:03
Re: [Erros] Dialog - by noobre - 30.06.2012, 00:06
Re: [Erros] Dialog - by RebeloX - 30.06.2012, 00:41
Re: [Erros] Dialog - by noobre - 30.06.2012, 00:47
Re: [Erros] Dialog - by RebeloX - 30.06.2012, 22:06

Forum Jump:


Users browsing this thread: 1 Guest(s)