Zone löscht sich nicht aus Datenbank

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,


    die Zone die ich ingame löschen möchte, löscht sich nicht aus der Datenbank.


    ocmd:destroyzone(playerid, params[])
    {
    new zone = M_GetPlayerCurrentZone(playerid), query[100];
    if(SpielerInfo[playerid][sAdminlevel] < 3) return SendClientMessage(playerid, COLOR_LIGHTGREY, "[Warnung]: Du bist nicht berechtigt diesen Befehl zu benutzen!");
    if(SpielerInfo[playerid][sAdminduty] == 0) return SendClientMessage(playerid, COLOR_LIGHTGREY, "[Warnung]: Du befindest dich nicht im Administrator Dienst!");
    if(!M_IsPlayerInAnyZone(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Du bist in keiner Zone!");
    GZ[zone][flagge_x] = 0, GZ[zone][flagge_y] = 0, GZ[zone][flagge_z] = 0,
    GZ[zone][min_x] = 0, GZ[zone][min_y] = 0, GZ[zone][max_x] = 0, GZ[zone][max_y] = 0;
    DisableZone(zone);
    DestroyPickup(GZ[zone][pickup]);
    Delete3DTextLabel(GZ[zone][label]);
    if(GF[zone][started] >= 1) GF[zone][zeit] = GFTime;
    GZ[zone][erstellt] = 0;
    format(query, sizeof(query), "DELETE FROM gangfight WHERE id=%d", zone);
    mysql_pquery(handle, query);
    return SendClientMessage(playerid, COLOR_WHITE, "Du hast die Zone erfolgreich gelöscht.");
    }


    Mit freundlichen Grüßen
    Grapefruit

  • Schuldigung bin durcheinander gekommen :/


    [22:46:43] [DEBUG] mysql_errno - connection: 1
    [22:46:43] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `gangfight` ORDER BY id ASC", callback: "LoadGZ", format: "(null)"
    [22:46:43] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:46:43] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:46:43] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:46:43] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:46:43] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:46:43] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:46:43] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:46:43] [DEBUG] CMySQLQuery::Execute[LoadGZ] - starting query execution
    [22:46:43] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:46:43] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:46:43] [DEBUG] CMySQLQuery::Execute[LoadGZ] - query was successfully executed within 0.345 milliseconds
    [22:46:43] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:46:43] [DEBUG] Calling callback "LoadGZ"..
    [22:46:43] [DEBUG] cache_get_data - connection: 1
    [22:46:43] [DEBUG] cache_get_field_content_int - row: 0, field_name: "owner", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "owner", data: "1"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "maxX", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "maxX", data: "2064.98"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "maxY", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "maxY", data: "1344.08"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "minX", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "minX", data: "2025.21"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "minY", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "minY", data: "1304.88"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeX", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeX", data: "2051.65"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeY", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeY", data: "1318.56"
    [22:46:43] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeZ", connection: 1
    [22:46:43] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeZ", data: "10.6719"
    [22:46:43] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [22:47:33] [DEBUG] mysql_escape_string - source: "TaigX", connection: 1, max_len: 24
    [22:47:33] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM Accounts WHERE Spielername='TaigX'", callback: "CheckUser", format: "i"
    [22:47:33] [DEBUG] CMySQLQuery::Execute[CheckUser] - starting query execution
    [22:47:33] [DEBUG] CMySQLQuery::Execute[CheckUser] - query was successfully executed within 0.429 milliseconds
    [22:47:33] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:47:33] [DEBUG] Calling callback "CheckUser"..
    [22:47:33] [DEBUG] cache_get_data - connection: 1
    [22:47:33] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [22:47:36] [DEBUG] mysql_escape_string - source: "TaigX", connection: 1, max_len: 24
    [22:47:36] [DEBUG] mysql_escape_string - source: "995756", connection: 1, max_len: 128
    [22:47:36] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM Accounts WHERE Spielername = 'TaigX' AND Passwort ", callback: "OnPasswordResponse", format: "i"
    [22:47:36] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution
    [22:47:36] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.319 milliseconds
    [22:47:36] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:47:36] [DEBUG] Calling callback "OnPasswordResponse"..
    [22:47:36] [DEBUG] cache_get_data - connection: 1
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Logout", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Logout", data: "0"
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Geld", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Geld", data: "0"
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Level", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Level", data: "0"
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Adminlevel", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Adminlevel", data: "3"
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Logout", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Logout", data: "0"
    [22:47:36] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Gang", connection: 1
    [22:47:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Gang", data: "0"
    [22:47:36] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [22:47:56] [DEBUG] mysql_pquery - connection: 1, query: "DELETE FROM gangfight WHERE id=0", callback: "(null)", format: "(null)"
    [22:47:56] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [22:47:56] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.263 milliseconds
    [22:47:56] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [22:47:58] [DEBUG] mysql_escape_string - source: "[NLG]TaigX", connection: 1, max_len: 24
    [22:47:58] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE Accounts SET Geld='0', Level='0', Adminlevel='3', Logout=", callback: "(null)", format: "(null)"
    [22:47:58] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [22:47:58] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.278 milliseconds
    [22:47:58] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [22:48:29] [DEBUG] mysql_errno - connection: 1
    [22:48:29] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `gangfight` ORDER BY id ASC", callback: "LoadGZ", format: "(null)"
    [22:48:29] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:48:29] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:48:29] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:48:29] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:48:29] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:48:29] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:48:29] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:48:29] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:48:29] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:48:29] [DEBUG] CMySQLQuery::Execute[LoadGZ] - starting query execution
    [22:48:29] [DEBUG] CMySQLQuery::Execute[LoadGZ] - query was successfully executed within 0.299 milliseconds
    [22:48:29] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:48:29] [DEBUG] Calling callback "LoadGZ"..
    [22:48:29] [DEBUG] cache_get_data - connection: 1
    [22:48:29] [DEBUG] cache_get_field_content_int - row: 0, field_name: "owner", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "owner", data: "1"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "maxX", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "maxX", data: "2064.98"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "maxY", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "maxY", data: "1344.08"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "minX", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "minX", data: "2025.21"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "minY", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "minY", data: "1304.88"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeX", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeX", data: "2051.65"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeY", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeY", data: "1318.56"
    [22:48:29] [DEBUG] cache_get_field_content_float - row: 0, field_name: "flaggeZ", connection: 1
    [22:48:29] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "flaggeZ", data: "10.6719"
    [22:48:29] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called

  • Zitat

    [22:47:56] [DEBUG] mysql_pquery - connection: 1, query: "DELETE FROM gangfight WHERE id=0", callback: "(null)", format: "(null)"


    An sich ist das korrekt. Jetzt kommt es drauf an wie es in deiner Tabelle aussieht.
    Poste davon mal einen Screenshot, von den Daten (nicht die Struktur).