SA-MP Forums Archive
BlueG mySQL load data HELP! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: BlueG mySQL load data HELP! (/showthread.php?tid=476055)



BlueG mySQL load data HELP! - DarkPower - 16.11.2013

pawn Код:
format(query, (sizeof query), "SELECT pLozinka FROM korisnici WHERE pIme='%s'",getName(playerid, true));
        mysql_query(query);
        mysql_store_result();
        new registriran = mysql_num_rows();
        if(registriran > 0)
        {
           if(mysql_retrieve_row())
           {
                mysql_fetch_field_row(PlayerInfo[playerid][pLozinka], "pLozinka");
           }
           format(string, (sizeof string), "{FFFFFF}Dobrodoљao natrag %s!\nTvoje ime je registrirano na ovom serveru, sada morate upisati svoju lozinku\nkako bi mogli nastaviti igrati sa prethodnom statistikom!",getName(playerid));
           ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF8E00}Balkan Mafija", string, "Logiranje", "");
        }
        else if(registriran == 0)
        {
           format(string, (sizeof string), "{FFFFFF}Dobrodoљao %s!\nTvoje ime nije registrirano na ovom serveru i sada će te to morati napraviti!\nUpiљite ћeljenu lozinku i pritisnite 'Dalje >>' - lozinka mora imati {FF0000}viљe od 3 {FFFFFF}znaka i \n{FF0000}manje od 15 {FFFFFF}znakova!", getName(playerid));
           ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FF8E00}Balkan Mafija", string,"Dalje >>", "");
        }
        mysql_free_result();
        ClearPlayerChat(playerid);
        KillTimer(clearChat[playerid]);
I don't get any of this two dialogs.


Re: BlueG mySQL load data HELP! - Loot - 16.11.2013

Because the query returned false, check your mysql logs to see what went wrong.