Hey, habe ein Problem beim Kombinieren von Strings:
Und zwar habe ich keine Ahnung wie genau ich das mache, da mein MySQL-Format viel zu lang ist, brauche ich jetzt mehrer Strings, aber einfach noch einen neuen String machen und den dann speichern klappt nicht, der wird einfach ausgelassen..
new query[2048];
mysql_format(handle, query, sizeof(query), "UPDATE userdata SET level = '%d', money = '%d', kills = '%d', deaths = '%d', skin = '%d', adminlevel = '%d', fraktion = '%d', paycheck = '%d', kontoMoney = '%d', dig_seconds = '%d', dig_exp = '%d', dig_lvl = '%d', wanteds = '%d', prison = '%d', knastzeit = '%d', zelle = '%d', paydaymins = '%d', paydaysecs = '%d', spawn = '%d', contract = '%d', kh = '%d', pbscore = '%d', deathX = '%f', deathY = '%f', deathZ = '%f', mute = '%d' WHERE id = '%d'",
PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pFrak],
PlayerInfo[playerid][pPaycheck], PlayerInfo[playerid][pKonto], PlayerInfo[playerid][pDigCD], PlayerInfo[playerid][pDigEXP], PlayerInfo[playerid][pDigLvL], PlayerInfo[playerid][pWanteds], PlayerInfo[playerid][pPrison],
PlayerInfo[playerid][pJail], PlayerInfo[playerid][pCell], PlayerInfo[playerid][pPaydayMins], PlayerInfo[playerid][pPaydaySecs], PlayerInfo[playerid][pSpawn], PlayerInfo[playerid][pContract], PlayerInfo[playerid][pKH],
PlayerInfo[playerid][pPBScore], PlayerInfo[playerid][pDeathX], PlayerInfo[playerid][pDeathY], PlayerInfo[playerid][pDeathZ], PlayerInfo[playerid][pMuted], PlayerInfo[playerid][p_id]);
mysql_pquery(handle, query);
new query2[2048];
mysql_format(handle, query2, sizeof(query2), "UPDATE userdata SET skill_delivery = '%d', skill_delivery_exp = '%d', skill_delivery_max = '%d' WHERE id = '%d'",
PlayerInfo[playerid][pSkillDeliv], PlayerInfo[playerid][pSkillDelivEXP], PlayerInfo[playerid][pSkillDelivMAX], PlayerInfo[playerid][p_id]);
mysql_pquery(handle, query2);
Alles anzeigen
MySQL:
[01:08:54] [DEBUG] mysql_format - connection: 1, len: 2048, format: "UPDATE userdata SET level = '%d', money = '%d', kills = '%d', deaths = '%d', skin = '%d', adminlevel = '%d', fraktion = '%d', pa..."
[01:08:54] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE userdata SET level = '1', money = '45900', kills = '54', ", callback: "(null)", format: "(null)"
[01:08:54] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[01:08:54] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 40.499 milliseconds
[01:08:54] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving