Jump to content

Problema register/login


david1995

Recommended Posts

Salut , am inceput un nou gm si am inceput sa fac sistemul register/login si etapele de register si imi da urmatoarea erroare la compliare

C:\Users\Zydrax\Desktop\new\pawno\dsada.pwn(510) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

si linia este

 

else// altfel , daca parola este gresita

Link to comment
Share on other sites

20 hours ago, NoNamed said:

Arata-mi tot ShowPlayerDialog-ul de acolo .

Quote
forward OnLogin(playerid);// definim callback ul
public OnLogin(playerid)// facem publicul
{
    new rows, fields,temporar[200];// definim randurile si domeniile, iar temporar se va folosi la extragerea stringurilor
    cache_get_data(rows, fields);// facem interogarea lor
    if(rows)// daca playerul are randuri(adica daca are cont creat, odata cu contul se creeaza randurile)
    {
        //deci daca are randuri
        P_Data[playerid][pParola] = cache_get_field_content(0, "Parola",temporar);// i se vaextrage parola si i se verifica daca coincide cu numele. Se foloseste new-ul temporar pentru extragerea parolei, ea retinandu-se temporar(pana cand se deconecteaza jucatorul)
        P_Data[playerid][pID] = cache_get_field_content_int(0, "ID");// i se vaextrage ip-ul
        //un exemplu ar fi , daca are Admin , va fi ceva de genu P_Data[playerid][pAdmin] = cache_get_field_content_int(0,"Admin)"; i se va extrage din baza de date levelul de admin si i se va returna pe server, mai precis, cand se conecteaza are levelul de admin , care i-a fost setat de owner
        SpawnPlayer(playerid);// si se va da spawn
    }
    else// altfel , daca parola este gresita
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Parola incorecta!", "Te rog sa iti introduci parola corecta, pentru a te loga pe server.", "Logare", "Exit");// ii va da dialogul cu mesajul specific.
    }
    return 1;
}

 

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
Reply to this topic...

×   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.