CMySQLQuery::Execute[] - error will be triggered in OnQueryError

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,


    Meine nie enden wollende Folge an Fehlern geht weiter...


    Diesmal habe ich einen MYSQL Error bei dem ich keine Ahnung habe was er will..
    Er speichert auch nichts in die Datenbank:


    Code
    new query[256];
            mysql_format(handle, query, sizeof(query), "UPDATE users level = '%d', money = '%d', kills = '%d', deaths = '%d', wbskill = '%d',");
    		strcat(query, "FahrzeugID = '%d', FahrzeugKM = '%d', FahrzeugNummer = '%d', FX = '%d', FY = '%d', FZ = '%d', Team = '%d', Radio = '%d', rankteam = '%d', Handschellen = '%d', Tazer = '%d', Knastzeit = '%d', Wanteds = '%d' WHERE id = '%d'""");
    		strcat(query, "PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][wbskill], PlayerInfo[playerid][FahrzeugID], PlayerInfo[playerid][FahrzeugKM], PlayerInfo[playerid][FahrzeugNummer],");
    		strcat(query, "PlayerInfo[playerid][FX], PlayerInfo[playerid][FY], PlayerInfo[playerid][FZ], PlayerInfo[playerid][Team], PlayerInfo[playerid][Radio], PlayerInfo[playerid][rankteam], PlayerInfo[playerid][Handschellen], PlayerInfo[playerid][Tazer],PlayerInfo[playerid][Knastzeit],");
    		strcat(query, "PlayerInfo[playerid][Wanteds], PlayerInfo[playerid][p_id]);");
            mysql_pquery(handle, query);


    Fehler:


    Code
    [18:33:29] [DEBUG] mysql_format - connection: 1, len: 256, format: "UPDATE users level = '%d', money = '%d', kills = '%d', deaths = '%d', wbskill = '%d',"
    [18:33:29] [ERROR] mysql_format - no value for specifier "%d" available
    [18:33:29] [ERROR] mysql_format - no value for specifier "%d" available
    [18:33:29] [ERROR] mysql_format - no value for specifier "%d" available
    [18:33:29] [ERROR] mysql_format - no value for specifier "%d" available
    [18:33:29] [ERROR] mysql_format - no value for specifier "%d" available
    [18:33:29] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE users level = '', money = '', kills = '', deaths = '', wb", callback: "(null)", format: "(null)"
    [18:33:29] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [18:33:29] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= '', money = '', kills = '', deaths = '', wbskill = '',FahrzeugID = '%d', Fahrz' at line 1
    [18:33:29] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError


    Weiß jemand Bescheid?


    Ich bin für heute am Ende ?(

  • Versuche es so:

    new query[256];
    mysql_format(handle, query, sizeof(query), "UPDATE users SET level = '%d', money = '%d', kills = '%d', deaths = '%d', wbskill = '%d',", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][wbskill]);
    mysql_format(handle, query, sizeof(query), "%sFahrzeugID = '%d', FahrzeugKM = '%d', FahrzeugNummer = '%d', FX = '%d', FY = '%d', FZ = '%d', Team = '%d', ", query, PlayerInfo[playerid][FahrzeugID], PlayerInfo[playerid][FahrzeugKM], PlayerInfo[playerid][FahrzeugNummer],PlayerInfo[playerid][FX], PlayerInfo[playerid][FY], PlayerInfo[playerid][FZ], PlayerInfo[playerid][Team]);
    mysql_format(handle, query, sizeof(query), "%sRadio = '%d', rankteam = '%d', Handschellen = '%d', Tazer = '%d', Knastzeit = '%d', Wanteds = '%d' WHERE id = '%d'", query, PlayerInfo[playerid][Radio], PlayerInfo[playerid][rankteam], PlayerInfo[playerid][Handschellen], PlayerInfo[playerid][Tazer],PlayerInfo[playerid][Knastzeit],PlayerInfo[playerid][Wanteds], PlayerInfo[playerid][p_id]);
    mysql_pquery(handle, query);

  • Der eine Error ist gelöst, jetzt kam aber der:


    Code
    [19:24:28] [ERROR] mysql_format - destination size is too small
    [19:24:28] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE users SET level = '1', money = '300', kills = '0', deaths", callback: "(null)", format: "(null)"
    [19:24:28] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [19:24:28] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
    [19:24:28] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError