Wenn ich mir einen neuen Account im Spiel erstelle, geschieht alles problemlos, kommts aber zur Speicherung
macht MySQL Faxen. Die Frage ist warum? Ich habe mal die MySQL_LOG beobachtet und konnte nichts
fehlerhaftes finden. Habe auch meinen SaveUserStats Stock mehrmals überarbeitet und einen Backup eingefügt,
aber zeigt dennoch Errors an.
So sieht mein SaveUserStats-Stock aus:
Code
stock SaveUserStats(playerid)
{
if(!Spieler[playerid][Eingeloggt]) return 1;
new query[500];
mysql_format(handle, query, sizeof(query), "UPDATE users SET registriert = '%d', anfangsskin = '%d', skin = '%d', level = '%d', money = '%d', adminlevel = '%d', fraktion = '%d',vteam = '%d', rang = '%d', wanteds = '%d', wantedgrund = '%s', muted = '%d', mutetime = '%d', spielzeit = '%d', email = '%s', jailtime = '%d', jailed = '%d', jailtype = '%d',",
Spieler[playerid][Registriert],
Spieler[playerid][Anfangsskin],
Spieler[playerid][Skin] = GetPlayerSkin(playerid),
Spieler[playerid][Level] = GetPlayerScore(playerid),
Spieler[playerid][Money] = GetPlayerMoney(playerid),
Spieler[playerid][Adminlevel],
Spieler[playerid][Fraktion],
Spieler[playerid][vTeam],
Spieler[playerid][Rang],
Spieler[playerid][Wanteds],
Spieler[playerid][WantedGrund],
Spieler[playerid][Muted],
Spieler[playerid][MuteTime],
Spieler[playerid][Spielzeit],
Spieler[playerid][Email],
Spieler[playerid][JailTime],
Spieler[playerid][Jailed],
Spieler[playerid][JailType]);
mysql_format(handle, query, sizeof(query),"klasse = '%d', morde = '%d', tode = '%d', verbrechen = '%d', ap = '%d', premium = '%d', donator = '%d', contractgeld = '%d', changeteamzeit = '%d', carkey = '%d', eventmann = '%d', ooctog = '%d', pntog = '%d', killstreaksoundtog = '%d', hitsoundtog = '%d', connecttog = '%d', advertisetog = '%d', mitgliedertog = '%d', lottonr = '%d' WHERE id = '%d'",
Spieler[playerid][Klasse],
Spieler[playerid][Morde],
Spieler[playerid][Tode],
Spieler[playerid][Verbrechen],
Spieler[playerid][AP],
Spieler[playerid][Premium],
Spieler[playerid][Donator],
Spieler[playerid][ContractGeld],
Spieler[playerid][ChangeteamZeit],
Spieler[playerid][Carkey],
Spieler[playerid][Eventmann],
Tog[playerid][OOCTog],
Tog[playerid][PNTog],
Tog[playerid][KillstreakSoundTog],
Tog[playerid][HitsoundTog],
Tog[playerid][ConnectTog],
Tog[playerid][Advertise],
Tog[playerid][Mitglieder],
Spieler[playerid][pLottoNr],
Spieler[playerid][p_id]);
mysql_pquery(handle, query);
return 1;
}
Alles anzeigen
So sieht meine MySQL Log aus:
SQL
[20:53:51] [WARNING] cache_get_field_content_int - no active cache
[20:53:51] [WARNING] cache_get_field_content_int - no active cache
[20:53:51] [WARNING] cache_get_field_content_int - no active cache
[20:53:51] [WARNING] cache_get_field_content_int - no active cache
[20:53:51] [WARNING] cache_get_field_content_int - no active cache
[20:53:51] [DEBUG] mysql_connect - host: "localhost", user: "kristik47", database: "samp_db", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[20:53:51] [DEBUG] CMySQLHandle::Create - creating new connection..
[20:53:51] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[20:53:51] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[20:53:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[20:53:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[20:53:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[20:53:51] [DEBUG] mysql_errno - connection: 1
[20:53:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[20:53:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[20:53:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[20:53:52] [DEBUG] CMySQLConnection::Connect - connection was successful
[20:53:52] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[20:53:52] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[20:53:52] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[20:54:16] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT id FROM users WHERE name = '%e'"
[20:54:16] [DEBUG] mysql_pquery - connection: 1, query: "SELECT id FROM users WHERE name = 'Don_Calypso'", callback: "OnUserCheck", format: "d"
[20:54:16] [DEBUG] CMySQLQuery::Execute[OnUserCheck] - starting query execution
[20:54:16] [DEBUG] CMySQLQuery::Execute[OnUserCheck] - query was successfully executed within 0.793 milliseconds
[20:54:16] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[20:54:16] [DEBUG] Calling callback "OnUserCheck"..
[20:54:16] [DEBUG] cache_get_row_count - connection: 1
[20:54:16] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[20:54:22] [DEBUG] mysql_format - connection: 1, len: 256, format: "INSERT INTO users (name, password) VALUES ('%e', MD5('%e'))"
[20:54:22] [DEBUG] mysql_pquery - connection: 1, query: "INSERT INTO users (name, password) VALUES ('Don_Calypso', MD5('S", callback: "OnUserRegister", format: "d"
[20:54:22] [DEBUG] CMySQLQuery::Execute[OnUserRegister] - starting query execution
[20:54:22] [DEBUG] CMySQLQuery::Execute[OnUserRegister] - query was successfully executed within 1.96 milliseconds
[20:54:22] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[20:54:22] [DEBUG] Calling callback "OnUserRegister"..
[20:54:22] [DEBUG] cache_insert_id - connection: 1
[20:54:22] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[20:54:26] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE users SET email = '%s' WHERE id = '%d'"
[20:54:26] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE users SET email = 'kristik1999xd@gmail.com' WHERE id = '4", callback: "(null)", format: "(null)"
[20:54:26] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[20:54:26] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 5.136 milliseconds
[20:54:26] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
[20:54:28] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM users WHERE name = '%e' AND password = MD5('%e')"
[20:54:28] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM users WHERE name = 'Don_Calypso' AND password = MD", callback: "OnUserLogin", format: "d"
[20:54:28] [DEBUG] CMySQLQuery::Execute[OnUserLogin] - starting query execution
[20:54:28] [DEBUG] CMySQLQuery::Execute[OnUserLogin] - query was successfully executed within 0.545 milliseconds
[20:54:28] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[20:54:28] [DEBUG] Calling callback "OnUserLogin"..
[20:54:28] [DEBUG] cache_get_row_count - connection: 1
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "42"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "registriert", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "registriert", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "anfangsskin", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "anfangsskin", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "skin", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "skin", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "level", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "money", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "adminlevel", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "adminlevel", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "fraktion", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "fraktion", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "vteam", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "vteam", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "rang", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "rang", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "wanteds", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "wanteds", data: "0"
[20:54:28] [DEBUG] cache_get_field_content - row: 0, field_name: "wantedgrund", connection: 1, max_len: 128
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "wantedgrund", data: "NULL"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "muted", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "muted", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "mutetime", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "mutetime", data: "0"
[20:54:28] [DEBUG] cache_get_field_content - row: 0, field_name: "email", connection: 1, max_len: 128
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "email", data: "kristik1999xd@gmail.com"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "spielzeit", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "spielzeit", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "jailtime", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "jailtime", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "jailed", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "jailed", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "jailtype", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "jailtype", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "lottozahl", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "lottozahl", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "klasse", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "klasse", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "morde", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "morde", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "tode", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "tode", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "verbrechen", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "verbrechen", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ap", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ap", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "premium", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "premium", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "donator", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "donator", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "contractgeld", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "contractgeld", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "changeteamzeit", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "changeteamzeit", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "carkey", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "carkey", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "eventmann", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "eventmann", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "lottonr", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "lottonr", data: "0"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ooctog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ooctog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pntog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "pntog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "killstreaksoundtog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "killstreaksoundtog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "hitsoundtog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "hitsoundtog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "connecttog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "connecttog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "advertisetog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "advertisetog", data: "1"
[20:54:28] [DEBUG] cache_get_field_content_int - row: 0, field_name: "mitgliedertog", connection: 1
[20:54:28] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "mitgliedertog", data: "1"
[20:54:28] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[20:57:20] [DEBUG] mysql_format - connection: 1, len: 750, format: "UPDATE users SET registriert = '%d', anfangsskin = '%d', skin = '%d', level = '%d', money = '%d', adminlevel = '%d', fraktion = ..."
[20:57:20] [DEBUG] mysql_format - connection: 1, len: 750, format: "klasse = '%d', morde = '%d', tode = '%d', verbrechen = '%d', ap = '%d', premium = '%d', donator = '%d', contractgeld = '%d', cha..."
[20:57:20] [DEBUG] mysql_pquery - connection: 1, query: "klasse = '0', morde = '0', tode = '0', verbrechen = '0', ap = '0", callback: "(null)", format: "(null)"
[20:57:20] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[20:57:20] [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 'klasse = '0', morde = '0', tode = '0', verbrechen = '0', ap = '0', premium = '0'' at line 1
[20:57:20] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
Alles anzeigen
Ich bedanke mich schon mal im Voraus.
Mit freundlichen Grüßen
Kristik47