[Ajuda] Retornar o valor da senha digitado em um INPUT
#1

Fala galera do Forum SA-MP!
Entгo, estou criando um login aqui, e estб dando um erro na linha 179
Код:
unico.pwn(179) : error 035: argument type mismatch (argument 3)
179: DOF2_SetInt(file, "Senha", inputtext);
Todo o meu Dialog Response:
Код:
if(dialogid == D_REGISTRO)
    {
        if(response)
        {
            if(strlen(inputtext) < MIN_SENHA || strlen(inputtext) > MAX_SENHA)
            {
                new Format[128];
                format(Format, sizeof(Format), "[~] A senha que vocк digitou deve ter entre %d e %d caracteres!", MIN_SENHA, MAX_SENHA);
                SendClientMessage(playerid, VERMELHO, Format);
                format(Format, sizeof(Format), "{B360FD}Usuбrio: {FFFFFF}%s \n\n{FFFFFF}Conta: {00FF00}Registrada\n\n{FFFFFF}Digite sua senha para logar:", aname);
                ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}Conta", Format, "Logar", "Sair");
                return 1;
            }
            DOF2_CreateFile(file);
            DOF2_SetInt(file, "Senha", inputtext);
            DOF2_SetInt(file, "Dinheiro", 5000);
            DOF2_SetInt(file, "Level", 5);
            DOF2_SetInt(file, "Skin", 115);
            DOF2_SaveFile();
            SetSpawnInfo(playerid, 1, DOF2_GetInt(file, "Skin"), 1242.8329, -1692.9141, 16.1966, 180.7015, 0, 0, 0, 0, 0, 0);
            SpawnPlayer(playerid);
        }
        else
        {
            Kick(playerid);
            return 1;
        }
    }
Atenciosamente,
TiiP
Reply
#2

Coloque assim:
pawn Код:
DOF2_SetString(file, "Senha", inputtext);
Reply
#3

Nossa cara, obrigado mesmo!
Como pode 1 palavrinha resolver tudo hehe

Atenciosamente,
TiiP
Reply
#4

Quote:
Originally Posted by tiiP
Посмотреть сообщение
Nossa cara, obrigado mesmo!
Como pode 1 palavrinha resolver tudo hehe

Atenciosamente,
TiiP
Presta atenзгo amigo, vocк tб confundindo inteiro com string, й preciso saber diferenciar cada um (talvez vocк saiba e sу tenha errado sem prestar atenзгo):

Quote:

Exemplos

Inteiros: ..., -2, -1, 0, 1, 2, ...

Strings: minhasenha123, minhasenha, 1234senha, ...

Floats: 10.1, -0.5, 1.2, 5.5, ...

Chars: c, a, 1, b, d, ...

Hexadecimal: 0xFFCC00, 0xB6FF00, 0xCCCCCC, ...

Reply
#5

Entгo ipsLeon, vlw.
O que acontece й o seguinte:
Eu jб conhecia o INT, STRING & FLOAT.

Porйm nem me toquei sobre isso ali. hehe
Obrigado, agora jб sei do char e HexaDecimal xD

Atenciosamente,
TiiP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)