[HELP] samp-server Close
#1

Hiii everybody

i made this code, but when i test it, it closes the samp-server window


Code:


pawn Код:
if(dialogid == 100)//Registrar
        {
        if(!response)
            {
            SendClientMessage(playerid, ROSA, "Vocк nгo aceitou Registrar-se... Foi kickado");
            Kick(playerid);
            return 1;
            }
        if(strlen(inputtext) < 6)
            {
            SendClientMessage(playerid, AZUL, "Sua senha deve ter mais que 6 carateres");
            format(string, sizeof(string), "Vocк nгo estб registrado (Nome: %s) \r\n Digite a senha na caixa:", PlayerName(playerid));
            ShowPlayerDialog(playerid, 100, 3, "Registrar", string, "Registrar", "Cancelar");
            return 1;
            }
        if(response)
            {
            new senha[32]; // i think the error is somewhere in those lines (this one and the next 5 lines)
            format(senha, sizeof(senha), "%s", Encriptar(inputtext));
            new fname[32];
            format(string, sizeof(string), "%s.ini", PlayerName(playerid));
            dini_Create(fname);
            dini_Set(fname, "Senha", senha);
            SendClientMessage(playerid, ROXO, "Vocк se Registou com sucesso. Parabйns");
            OnPlayerConnect(playerid);
            return 1;
            }
        }

i think, but i can't figure out


there is the funcion i created Encriptar(string[]):


pawn Код:
stock Encriptar(string[])
{

    new parte1[5], parte2[5], parte3[5], parte4[5], parte5[5], senhaencript[32], senhafim[32];
    strmid(parte1, string, 1, 3);
    strmid(parte2, string, 3, 6);
    strmid(parte3, string, 2, 5);
    strmid(parte4, string, 1, 2);
    strmid(parte5, string, 4, 5);
    format(senhaencript, sizeof(senhaencript), "%s%s%s%s%s%s%s", parte1, parte2, parte3, parte4, parte5, parte3, string[2]);
    strdel(senhaencript, 4, 8);
    strdel(senhaencript, 2, 5);
    senhafim = senhaencript;
    return senhafim;
}


Those are the lasts lines from server_log.txt:

Код:
[21:29:41] 
----------------------------------
[21:29:41]   Running LVDM ~MoneyGrub

[21:29:41]          Coded By
[21:29:41]             Jax
[21:29:41] ----------------------------------

[21:29:41] Number of vehicle models: 48
[21:29:43] Incoming connection: 127.0.0.1:61806
[21:29:43] [join] Submit101 has joined the server (0:127.0.0.1)
[21:29:44] [part] Submit101 has left the server (0:2)




Thanks to everyone for read my problem



Sorry my bad english, i'm portuguese
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)