Jump to content
  • 0

Problema inregistrare


VLM

Question

12 answers to this question

Recommended Posts

  • 0
5 minutes ago, Gigel said:

Consola ce zice dupa ce introduci emailul? Ai ceva erori?

Mai ai o limita de 30 de caractere setata mai sus in cod - poate o depasesti
 


if(IsMail(inputtext) && response && strlen(inputtext) < 30)

 

Nu am erori in server.log, nu te lasa sa te inregistrezi daca depasesti limita, am incercat si fara limita.

Edited by VLM

#retras

Link to comment
Share on other sites

  • 0

Atunci, cel mai probabil o sa ai o functie deja dfinita pentru a forta update in baza de date (pEmailx sau ceva asemanator)

incearca sa adaugi condului tau linia asta:

Update(playerid,pEmailx);

oriunde dupa linia 

 mysql_query(SQL,str1);

dar inainte de return 1;

 

Exemplu:

 
case DIALOG_REGISTER4: {
        new length = strlen(inputtext), string[64];
        if(length > 40) return ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_INPUT, "Register:", "Scrie mai jos adresa ta de email!\nExemplu: [email protected]\n\nEmail invalid!", "Ok", "");
        if(IsMail(inputtext) && response && strlen(inputtext) < 30) {
            new emailtext[64];
            mysql_real_escape_string(inputtext, emailtext);
            strmid(PlayerInfo[playerid][pEmail], emailtext, 0, strlen(emailtext), 64);
            new str1[512];
            format(str1,512,"UPDATE `users` SET `Email`='%s' WHERE `ID`='%d'",PlayerInfo[playerid][pEmail],PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL,str1);
            Update(playerid,pEmailx);
            format(string, sizeof(string), "Email setat: %s.", PlayerInfo[playerid][pEmail]);
            SendClientMessage(playerid, 0xFFDE96FF, string);
            ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "Referral", "Ai fost adus de cineva pe aceasta comunitate?\nIntrodu codul de referral al celui care te-a adus pe server:\nDaca nu ai fost adus de nimeni apasa pe 'Close'", "Ok", "Close"); 
            return 1;
        }
        else ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_INPUT, "Email:", "Scrie mai jos adresa ta de email!\nExemplu: [email protected]\n\nEmail invalid!", "Ok", "");
    }

 

 

Edited by Gigel
Link to comment
Share on other sites

  • 0
11 hours ago, Gigel said:

Atunci, cel mai probabil o sa ai o functie deja dfinita pentru a forta update in baza de date (pEmailx sau ceva asemanator)

incearca sa adaugi condului tau linia asta:


Update(playerid,pEmailx);

oriunde dupa linia 


 mysql_query(SQL,str1);

dar inainte de return 1;

 

Exemplu:



 

case DIALOG_REGISTER4: {
        new length = strlen(inputtext), string[64];
        if(length > 40) return ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_INPUT, "Register:", "Scrie mai jos adresa ta de email!\nExemplu: [email protected]\n\nEmail invalid!", "Ok", "");
        if(IsMail(inputtext) && response && strlen(inputtext) < 30) {
            new emailtext[64];
            mysql_real_escape_string(inputtext, emailtext);
            strmid(PlayerInfo[playerid][pEmail], emailtext, 0, strlen(emailtext), 64);
            new str1[512];
            format(str1,512,"UPDATE `users` SET `Email`='%s' WHERE `ID`='%d'",PlayerInfo[playerid][pEmail],PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL,str1);
            Update(playerid,pEmailx);
            format(string, sizeof(string), "Email setat: %s.", PlayerInfo[playerid][pEmail]);
            SendClientMessage(playerid, 0xFFDE96FF, string);
            ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "Referral", "Ai fost adus de cineva pe aceasta comunitate?\nIntrodu codul de referral al celui care te-a adus pe server:\nDaca nu ai fost adus de nimeni apasa pe 'Close'", "Ok", "Close"); 
            return 1;
        }
        else ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_INPUT, "Email:", "Scrie mai jos adresa ta de email!\nExemplu: [email protected]\n\nEmail invalid!", "Ok", "");
    }

 

 

Am incercat, la fel, nu a mers.

#retras

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.