Tabellen werden nicht erstellt

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
  • stock CreateTables()
    {
    new query[4000];
    strcat(query,"CREATE TABLE IF NOT EXISTS accounts (id int(11) NOT NULL AUTO_INCREMENT, Name varchar(24) NOT NULL, Passwort varchar(40) NOT NULL, Adminlevel int(2) NOT NULL, Skin int(3) NOT NULL, Level int(2) NOT NULL, Geld int(11) NOT NULL, Konto int(1) NOT NULL, Kontostand int(11) NOT NULL,");
    strcat(query,"Personalausweis int(1) NOT NULL, Arbeitserlaubnis int(1) NOT NULL, Fraktkionssperre int(1) NOT NULL, Fraktion int(2) NOT NULL, Fraktionsrang int(1) NOT NULL, Leader int(1) NOT NULL, Pin int(11) NOT NULL, Kontonummer int(11) NOT NULL, Ganja int(6) NOT NULL, C4 int(6) NOT NULL, LSD int(6) NOT NULL,");
    strcat(query,"Warns int(1) NOT NULL, Job int(3) NOT NULL, Arbeitslosengeld int(1) NOT NULL, NvR-Points int(3) NOT NULL, PRIMARY KEY (id)");
    mysql_function_query(dbhandle,query,false,"","");
    return 1;
    }


    Mysql Version R33 BlueG
    Mysql LOG

    Spoiler anzeigen
    [20:54:08] [DEBUG] mysql_connect - host: "127.0.0.1", user: "****", database: "nvr", password: "****", port: 3306, autoreconnect: true
    [20:54:08] [DEBUG] CMySQLHandle::Create - creating new connection..
    [20:54:08] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [20:54:08] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
    [20:54:08] [DEBUG] CMySQLConnection::Connect - connection was successful
    [20:54:08] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [20:54:08] [DEBUG] CMySQLConnection::Connect - connection was successful
    [20:54:08] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [20:54:08] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS accounts (id int(11) NOT NULL AUTO_IN", callback: "(null)", format: "(null)"
    [20:54:08] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [20:54:08] [DEBUG] mysql_tquery - scheduling query "CREATE TABLE IF NOT EXISTS accounts (id int(11) NOT NULL AUTO_INCREMENT, Name varchar(24) NOT NULL, Passwort varchar(40) NOT NULL, Adminlevel int(2) NOT NULL, Skin int(3) NOT NULL, Level int(2) NOT NULL, Geld int(11) NOT NULL, Konto int(1) NOT NULL, Kontostand int(11) NOT NULL,Personalausweis int(1) NOT NULL, Arbeitserlaubnis int(1) NOT NULL, Fraktkionssperre int(1) NOT NULL, Fraktion int(2) NOT NULL, Fraktionsrang int(1) NOT NULL, Leader int(1) NOT NULL, Pin int(11) NOT NULL, Kontonummer int(11) NOT NULL, "..
    [20:54:08] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
    [20:54:08] [DEBUG] CMySQLQuery::Execute[()] - error will be triggered in OnQueryError
    [20:54:08] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
    [20:54:08] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called

  • Du hast am ende ein klammer vergessen ")" zu dem solltest du das callback
    OnQueryError hinzufügen


    public OnQueryError(errorid, error[], callback[], query[], connectionHandle) {
    printf("Errorid %d",errorid);
    print(error);
    print(callback);
    print(query);
    return 1;
    }


  • Danke dir, bei so vielen Klammern komm ich manchmal durcheinander


  • Danke dir, bei so vielen Klammern komm ich manchmal durcheinander


    Also wegen der Klammer die musst du hinten ergänzen
    strcat(query,"CREATE TABLE IF NOT EXISTS accounts (id int(11) NOT NULL AUTO_INCREMENT, Name varchar(24) NOT NULL, Passwort varchar(40) NOT NULL, Adminlevel int(2) NOT NULL, Skin int(3) NOT NULL, Level int(2) NOT NULL, Geld int(11) NOT NULL, Konto int(1) NOT NULL, Kontostand int(11) NOT NULL,");
    strcat(query,"Personalausweis int(1) NOT NULL, Arbeitserlaubnis int(1) NOT NULL, Fraktkionssperre int(1) NOT NULL, Fraktion int(2) NOT NULL, Fraktionsrang int(1) NOT NULL, Leader int(1) NOT NULL, Pin int(11) NOT NULL, Kontonummer int(11) NOT NULL, Ganja int(6) NOT NULL, C4 int(6) NOT NULL, LSD int(6) NOT NULL,");
    strcat(query,"Warns int(1) NOT NULL, Job int(3) NOT NULL, Arbeitslosengeld int(1) NOT NULL, NvR-Points int(3) NOT NULL, PRIMARY KEY (id))");
    mysql_function_query(dbhandle,query,false,"","");


    PRIMARY KEY (id))