Beiträge von .Kevin

    S

    debug log


    Sri :S


    [04:57:20] >> mysql_connect( )


    [04:57:20] CMySQLHandler::CMySQLHandler() - constructor called.


    [04:57:20] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "test" | Username: "root" ...


    [04:57:20] CMySQLHandler::Connect() - Connection was successful.


    [04:57:20] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.


    [04:58:05] >> mysql_real_escape_string( Connection handle: 75 )


    [04:58:05] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:58:05] >> mysql_query( Connection handle: 51 )


    [04:58:05] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).


    [04:58:05] >> mysql_store_result( Connection handle: 75 )


    [04:58:05] >> mysql_store_result() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:58:05] >> mysql_num_rows( Connection handle: 75 )


    [04:58:05] >> mysql_num_rows() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:58:11] >> mysql_real_escape_string( Connection handle: 75 )


    [04:58:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:58:11] >> mysql_real_escape_string( Connection handle: 75 )


    [04:58:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:58:11] >> mysql_query( Connection handle: 51 )


    [04:58:11] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_query( Connection handle: 80 )


    [04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_query( Connection handle: 80 )


    [04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_query( Connection handle: 80 )


    [04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_real_escape_string( Connection handle: 0 )


    [04:58:27] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).


    [04:58:27] >> mysql_query( Connection handle: 80 )


    [04:58:27] >> mysql_query() - Invalid connection handle. (You set: 80, Highest connection handle ID is 1).


    [04:59:11] >> mysql_real_escape_string( Connection handle: 75 )


    [04:59:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:59:11] >> mysql_query( Connection handle: 51 )


    [04:59:11] >> mysql_query() - Invalid connection handle. (You set: 51, Highest connection handle ID is 1).


    [04:59:11] >> mysql_store_result( Connection handle: 75 )


    [04:59:11] >> mysql_store_result() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).


    [04:59:11] >> mysql_num_rows( Connection handle: 75 )


    [04:59:11] >> mysql_num_rows() - Invalid connection handle. (You set: 75, Highest connection handle ID is 1).



    //EDIT
    Was bedeutet das jetzt ?

    Bitteschön.


    stock Connect_To_Database()
    {
    mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS); //Wir versuchen mit den Angaben die wir oben im Script gemacht haben uns mit dem MySQL Server zu verbinden.
    if(mysql_ping() == 1) //Es wird überprüft ob die Verbindung steht.
    {
    //Falls ja wird das in die Console geschrieben und die Funktion wird beendet.
    print("<-| [MYSQL] Verbindung zur Datenbank wurde erfolgreich hergestellt!");
    return true;
    }
    else
    {
    //Falls nicht wird erneut versucht eine verbindung aufzubauen.
    print("<-| [MYSQL] Es konnte keine Verbindung zur Datenbank hergestellt werden!");
    print("<-| [MYSQL] Es wird erneut versucht eine Verbindung zur Datenbank herzustellen!");
    mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
    if(mysql_ping() == 1)
    {
    print("<-| [MYSQL] Es konnte im 2 Versuch eine Verbindung hergestellt werden!");
    return true;
    }
    else
    {
    //Falls das auch nicht Funktioniert wird der Server zur Sicherheit wieder heruntergefahren.
    print("<-| [MYSQL] Es konnte keine Verbindung zur Datenbank hergestellt werden!");
    print("<-| [MYSQL] Der Server wird nun beendet!");
    SendRconCommand("exit");
    return true;
    }
    }
    }


    Spuckt er das aus:


    04:53:02] CMySQLHandler::CMySQLHandler() - constructor called.


    [04:53:02] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "test" | Username: "root" ...


    [04:53:02] CMySQLHandler::Connect() - Connection was successful.


    [04:53:02] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.


    [04:53:02] >> mysql_ping( Connection handle: 83056 )


    [04:53:02] >> mysql_ping() - Invalid connection handle. (You set: 83056, Highest connection handle ID is 1).


    [04:53:02] >> mysql_connect( )


    [04:53:02] CMySQLHandler::Connect() - Connection was successful.


    [04:53:02] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.


    [04:53:02] >> mysql_ping( Connection handle: 83056 )


    [04:53:02] >> mysql_ping() - Invalid connection handle. (You set: 83056, Highest connection handle ID is 1).


    [04:53:02] CMySQLHandler::~CMySQLHandler() - deconstructor called.


    [04:53:02] CMySQLHandler::FreeResult() - The result is already empty.


    [04:53:02] CMySQLHandler::Disconnect() - Connection was closed.

    Schönen guten Morgen.
    Ich habe ein kleines Problem. Ich habe mir jetzt nach dem Tutorial von Maddin ein Script erstellt. Nun
    möchte ich dies testen, doch mein Problem ist ich habe per Navicat eine Datenbank erstellt & per Xampp
    den MySql server gestartet. Doch ich bekomme jedes mal gesagt, das die Verbindung fehlgeschlagen ist ? -.-


    Ich hoffe ihr könnt mir helfen :S


    //EDIT Daten sind so eingetragen


    "127.0.0.1"
    "root"
    ""
    "test"


    & in Navicat siehts soo aus:



    DB
    information schema
    mysql
    test
    Table ... hier ist die accounts drinne

    Hast du den Rang auch als String definiert?
    Zeig mal deinen Enum.


    Ich bin nicht blöd ;O


    enum FraktionsInfo
    {
    ID,
    Rang1[12],
    Rang2[12],
    Rang3[12],
    Rang4[12],
    Rang5[12],
    Rang6[12],
    Bank
    }


    Auch wenn ich den String hochsetzte ändert es nix ;)

    Schönen guten Abend (Morgen)


    ich habe eine kurze frage, &zwar wie lese ich einen Text z.B Hallo aus.
    Mit dini_Set wird er ja gesetzt. Aber wie lese ich ihn aus ?

    Okay. Dann musst du nur die bestehen Spielerdateien durchgehen & überprüfen ob es den Wert schon gibt.


    Soweit ich weiß geht das mit Dini_Get

    Gefällt mir gut, vorallendingen das du dafür nur 10 Minuten gebraucht hast. *WoW*


    Ich würde aber beim Hintergrund von unten nach oben heller machen. Kommt besser zur Geltung 8)