Register / Login Dialog erscheint einfach nicht (MySQL)

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo. Habe grade ein Login/Register System gemacht.
    Allerdings wenn ich in den Server geh, kann ich nur auf "Spawn" drücken, also es erscheint kein Login / Register dialog..


    Dialoge:
    #define DIALOG_REGISTER 1
    #define DIALOG_LOGIN 2


    OnPlayerConecct:
    //Login/Register
    new name[MAX_PLAYER_NAME],query[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(query,sizeof(query),"SELECT id FROM user WHERE username='%s'",name);
    mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);
    return 1;


    OnUserCheck:
    public OnUserCheck(playerid)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==0)
    {
    //Registrierung
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort ein:","Okay","Abbrechen");
    }
    else
    {
    //Login
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"RP Login","Gib bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }


    MFG

  • Spoiler anzeigen

    [15:01:40] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:01:40] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:02:06] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:02:06] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:02:06] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:03:29] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:03:29] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:03:53] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:03:53] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:03:53] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:13:10] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:13:10] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:13:33] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:13:33] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:13:33] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:14:17] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:14:17] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:14:40] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:14:40] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:14:40] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:24:53] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:24:53] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:26:59] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:26:59] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:27:33] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:27:33] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:27:33] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:36:40] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:36:40] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:37:06] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:37:06] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:37:06] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:37:38] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:37:38] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:38:02] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:38:02] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:38:02] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)
    [15:57:55] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp518' localhost (using password: YES)
    [15:57:55] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp518' localhost (using password: YES)
    [15:59:16] [DEBUG] mysql_connect - host: "127.0.0.1", user: "samp518", database: "samp5180_selfmade", password: "****", port: 3306, autoreconnect: true
    [15:59:16] [DEBUG] CMySQLHandle::Create - creating new connection..
    [15:59:16] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [15:59:16] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
    [15:59:16] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp518' localhost (using password: YES)
    [15:59:16] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp518' localhost (using password: YES)
    [15:59:43] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM user WHERE username='Kid_Escobar'", callback: "OnUserCheck", format: "i"
    [15:59:43] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [15:59:43] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='Kid_Escobar'"..
    [15:59:43] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
    [15:59:43] [ERROR] CMySQLQuery::Execute[OnUserCheck(i)] - (error #2006) MySQL server has gone away
    [15:59:43] [WARNING] CMySQLQuery::Execute[OnUserCheck(i)] - lost connection, reconnecting..
    [15:59:43] [DEBUG] CMySQLConnection::Disconnect - connection was closed
    [15:59:43] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp518' localhost (using password: YES)
    [15:59:43] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - error will be triggered in OnQueryError
    [15:59:43] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
    [15:59:43] [DEBUG] Calling callback "OnQueryError"..
    [15:59:43] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called