[Ajuda] Erros
#1

Cуdigo:
pawn Код:
if(dialogid == 4) // linha 856 ..
{
    if(response == 0) // Se Ele Apertar Em Cancelar, Ou Seja, Aparecerб o Dialog Denovo, Obrigando ele a Escolher.
    {
       ShowPlayerDialog(playerid, GANG, DIALOG_STYLE_LIST, "Escolha o Seu Time","Zumbis\nHumanos","Selecionar","Cancelar");
    }
    if(response == 1)
    {
       if(listitem == 0)
       {
            gTeam[playerid] = Nazistas; // ou gTeam[playerid] == 1;   ( Seta Ele Para Gang Aztecas )
            SetPlayerSkin(playerid, 116); // Setarб Ele Para Skin 116, Dos Aztecas.
            SendClientMessage(playerid, CorNazi,"Vocк Escolheu Ser Nazi.");
            SpawnPlayer(playerid); // Spawn o Player
            return true;
        }
        if(listitem == 1)
        {
            gTeam[playerid] = Mexicanos; // ou gTeam[playerid] == 2;   ( Seta Ele Para Gang Grove )
            SetPlayerSkin(playerid, 107); // Setarб Ele Para Skin 107, Dos Grove.
            SendClientMessage(playerid, CorMexicano,"Vocк Escolheu Ser Mexicanos.");
            SpawnPlayer(playerid);  // Spawn o Player
            return true;
        }
        if(listitem == 2)
        {
            gTeam[playerid] = Gangsters; // ou gTeam[playerid] == 3;   ( Seta Ele Para Gang Ballas)
            SetPlayerSkin(playerid, 102); // Setarб Ele Para Skin 107, Dos Ballas.
            SendClientMessage(playerid, CorGangster,"Vocк Escolheu Ser Gangster.");
            SpawnPlayer(playerid); // Spawn o Player
            return true;
        }
        return true;
    }
    return true;
}
Erros:


pawn Код:
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(856) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(858) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(862) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(864) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(870) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(872) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(878) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(880) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(886) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(888) : error 010: invalid function or declaration
C:\Documents and Settings\Pedro Nobre\Ambiente de trabalho\Blank Gamemode\gamemodes\Blank.pwn(890) : error 010: invalid function or declaration
Reply
#2

posta linhas do erros..


#Edit descupe nao vi ali em cima ><
Reply
#3

como faзo ?
Reply
#4

Aqui Compilou...

Botou na Public OnDialogResponse ?
Reply
#5

Jonathan, tens aqui a public completa:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new File[50];
    format(File, sizeof(File), PFiles, pName(playerid));
    switch(dialogid)
    {
        case LOGIN:
        {
            if(response)
            {
                if(strlen(inputtext) == 0)
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome back: "#CDGREEN"%s(%d)\n"#CBLUE"Enter your password to login:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Login", "Leave");
                }
                if(strcmp(inputtext, dj(File, "Password", 40), true) == 0)
                {
                    SendClientMessage(playerid, COLOR_LIGHTGREEN, "You are now logged in!");
                    SpawnPlayer(playerid);
               
                    PVar[playerid][pKills]      = djInt     (File, "Kills");
                    PVar[playerid][pDeaths]     = djInt     (File, "Deaths");
                    PVar[playerid][pLevel]      = djInt     (File, "Level");
                    PVar[playerid][pMuted]      = djInt     (File, "Muted");
                    format(PVar[playerid][pMutedReason], 52, "%s", dj(File, "MutedReason"));
                   
                    PVar[playerid][pLastX]      = djFloat   (File, "LastX");
                    PVar[playerid][pLastY]      = djFloat   (File, "LastY");
                    PVar[playerid][pLastZ]      = djFloat   (File, "LastZ");
                }
                else
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome back: "#CDGREEN"%s(%d)\n"#CBLUE"Enter your password to login:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Login", "Leave");
                }
            }
            else Kick(playerid);
        }
        case REGISTER:
        {
            if(response)
            {
                if(strlen(inputtext) == 0)
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome: "#CDGREEN"%s(%d)\n"#CBLUE"This account has not been registered! Please enter a password:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Registar", "Sair");
                }
                djCreateFile(File);
               
                djSet           (File, "Password",  inputtext);
                djSetInt        (File, "Kills",     0);
                djSetInt        (File, "Deaths",    0);
                djSetInt        (File, "Level",     0);
                djSetInt        (File, "Muted",     0);
                djSet           (File, "MutedReason", "Not Muted!");
               
                djSetFloat      (File, "LastX",     0.0);
                djSetFloat      (File, "LastY",     0.0);
                djSetFloat      (File, "LastZ",     0.0);
           
                djCommit(File);
           
                SendClientMessage(playerid, COLOR_LIGHTGREEN, "Regista-te com sucesso e entraste automaticamente!");
            }
            else Kick(playerid);
        }
    }
    return 1;
}
if(dialogid == 4)
{
    if(response == 0) // Se Ele Apertar Em Cancelar, Ou Seja, Aparecerб o Dialog Denovo, Obrigando ele a Escolher.
    {
       ShowPlayerDialog(playerid, GANG, DIALOG_STYLE_LIST, "Escolha o Seu Time","Zumbis\nHumanos","Selecionar","Cancelar");
    }
    if(response == 1)
    {
       if(listitem == 0)
       {
            gTeam[playerid] = Nazistas; // ou gTeam[playerid] == 1;   ( Seta Ele Para Gang Aztecas )
            SetPlayerSkin(playerid, 116); // Setarб Ele Para Skin 116, Dos Aztecas.
            SendClientMessage(playerid, CorNazi,"Vocк Escolheu Ser Nazi.");
            SpawnPlayer(playerid); // Spawn o Player
            return true;
        }
        if(listitem == 1)
        {
            gTeam[playerid] = Mexicanos; // ou gTeam[playerid] == 2;   ( Seta Ele Para Gang Grove )
            SetPlayerSkin(playerid, 107); // Setarб Ele Para Skin 107, Dos Grove.
            SendClientMessage(playerid, CorMexicano,"Vocк Escolheu Ser Mexicanos.");
            SpawnPlayer(playerid);  // Spawn o Player
            return true;
        }
        if(listitem == 2)
        {
            gTeam[playerid] = Gangsters; // ou gTeam[playerid] == 3;   ( Seta Ele Para Gang Ballas)
            SetPlayerSkin(playerid, 102); // Setarб Ele Para Skin 107, Dos Ballas.
            SendClientMessage(playerid, CorGangster,"Vocк Escolheu Ser Gangster.");
            SpawnPlayer(playerid); // Spawn o Player
            return true;
        }
        return true;
    }
    return true;
}
nao sei o que estб mal, mesmo.
Reply
#6

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new File[50];
    if(dialogid == 4)
    {
       if(response == 0) // Se Ele Apertar Em Cancelar, Ou Seja, Aparecerб o Dialog Denovo, Obrigando ele a Escolher.
       {
          ShowPlayerDialog(playerid, GANG, DIALOG_STYLE_LIST, "Escolha o Seu Time","Zumbis\nHumanos","Selecionar","Cancelar");
       }
       if(response == 1)
       {
          if(listitem == 0)
          {
               gTeam[playerid] = Nazistas; // ou gTeam[playerid] == 1;   ( Seta Ele Para Gang Aztecas )
               SetPlayerSkin(playerid, 116); // Setarб Ele Para Skin 116, Dos Aztecas.
               SendClientMessage(playerid, CorNazi,"Vocк Escolheu Ser Nazi.");
               SpawnPlayer(playerid); // Spawn o Player
               return true;
           }
           if(listitem == 1)
           {
               gTeam[playerid] = Mexicanos; // ou gTeam[playerid] == 2;   ( Seta Ele Para Gang Grove )
               SetPlayerSkin(playerid, 107); // Setarб Ele Para Skin 107, Dos Grove.
               SendClientMessage(playerid, CorMexicano,"Vocк Escolheu Ser Mexicanos.");
               SpawnPlayer(playerid);  // Spawn o Player
               return true;
           }
           if(listitem == 2)
           {
               gTeam[playerid] = Gangsters; // ou gTeam[playerid] == 3;   ( Seta Ele Para Gang Ballas)
               SetPlayerSkin(playerid, 102); // Setarб Ele Para Skin 107, Dos Ballas.
               SendClientMessage(playerid, CorGangster,"Vocк Escolheu Ser Gangster.");
               SpawnPlayer(playerid); // Spawn o Player
               return true;
           }
           return true;
       }
       return true;
    }
    format(File, sizeof(File), PFiles, pName(playerid));
    switch(dialogid)
    {
        case LOGIN:
        {
            if(response)
            {
                if(strlen(inputtext) == 0)
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome back: "#CDGREEN"%s(%d)\n"#CBLUE"Enter your password to login:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Login", "Leave");
                }
                if(strcmp(inputtext, dj(File, "Password", 40), true) == 0)
                {
                    SendClientMessage(playerid, COLOR_LIGHTGREEN, "You are now logged in!");
                    SpawnPlayer(playerid);
               
                    PVar[playerid][pKills]      = djInt     (File, "Kills");
                    PVar[playerid][pDeaths]     = djInt     (File, "Deaths");
                    PVar[playerid][pLevel]      = djInt     (File, "Level");
                    PVar[playerid][pMuted]      = djInt     (File, "Muted");
                    format(PVar[playerid][pMutedReason], 52, "%s", dj(File, "MutedReason"));
                   
                    PVar[playerid][pLastX]      = djFloat   (File, "LastX");
                    PVar[playerid][pLastY]      = djFloat   (File, "LastY");
                    PVar[playerid][pLastZ]      = djFloat   (File, "LastZ");
                }
                else
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome back: "#CDGREEN"%s(%d)\n"#CBLUE"Enter your password to login:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Login", "Leave");
                }
            }
            else Kick(playerid);
        }
        case REGISTER:
        {
            if(response)
            {
                if(strlen(inputtext) == 0)
                {
                    new
                        iStr[128];

                    format(iStr, sizeof(iStr), ""#CBLUE"Welcome: "#CDGREEN"%s(%d)\n"#CBLUE"This account has not been registered! Please enter a password:", pName(playerid), playerid);
                    return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ""#CBLUE"Login", iStr, "Registar", "Sair");
                }
                djCreateFile(File);
               
                djSet           (File, "Password",  inputtext);
                djSetInt        (File, "Kills",     0);
                djSetInt        (File, "Deaths",    0);
                djSetInt        (File, "Level",     0);
                djSetInt        (File, "Muted",     0);
                djSet           (File, "MutedReason", "Not Muted!");
               
                djSetFloat      (File, "LastX",     0.0);
                djSetFloat      (File, "LastY",     0.0);
                djSetFloat      (File, "LastZ",     0.0);
           
                djCommit(File);
           
                SendClientMessage(playerid, COLOR_LIGHTGREEN, "Regista-te com sucesso e entraste automaticamente!");
            }
            else Kick(playerid);
        }
    }
    return 1;
}
Reply
#7

Certissimo, agradecido.
Reputation +1 (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)