16.02.2013, 20:03
Hello, i've got a problem on my test server that i'm unable to solve where the statistics of my server don't save! I get a syntax error in the mysql_log, the code is:
Anyone know a resolution?
Regards
Oscii
pawn Код:
//Mysql
public SaveInfo(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(JugadorLogeado[playerid] == 0) return 0;
printf("Saving %s (%i) data...", PlayerNameEx(playerid), playerid);
// Update the players IP address
// GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 20);
// Get the player weapons
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, PlayerWeapons[playerid][i][0], PlayerWeapons[playerid][i][1]);
}
new Query[3500];
format(Query, sizeof(Query), "UPDATE `users` SET PuntosRol = '%i', Weapon = '%i', Weapon2 = '%i', Weapon3 = '%i', Ammo = '%i', Ammo2 = '%i', Ammo3 = '%i'", PlayerInfo[playerid][jPuntosR], PlayerInfo[playerid][jWeapon], PlayerInfo[playerid][jWeapon2], PlayerInfo[playerid][jWeapon3], PlayerInfo[playerid][jAmmo], PlayerInfo[playerid][jAmmo2], PlayerInfo[playerid][jAmmo3]);
format(Query, sizeof(Query), "%s, VIP = '%i', Admin = '%i', Coins = '%i', Nivel = '%i', Banned = '%i', Member = '%i', Exp = '%i', PermZombie = '%d', MedicinaA = '%i', MedicinaB = '%i'", Query, PlayerInfo[playerid][jVip], PlayerInfo[playerid][jAdmin], PlayerInfo[playerid][jCoins], PlayerInfo[playerid][jLevel], PlayerInfo[playerid][jBanned], PlayerInfo[playerid][jMember], PlayerInfo[playerid][jExp], PlayerInfo[playerid][jPermZomb], PlayerInfo[playerid][jMedicinaA], PlayerInfo[playerid][jMedicinaB]);
format(Query, sizeof(Query), "%s, Tazer = '%i', Vendas = '%i', KitMed = '%i', Bengala` = '%i', Adrenalina = '%i', Radio = '%i', Leader = '%i', Tutorial = '%d', Origen = '%i'", Query, PlayerInfo[playerid][jTazer], PlayerInfo[playerid][jVendas], PlayerInfo[playerid][jKitMed], PlayerInfo[playerid][jBengala], PlayerInfo[playerid][jAdrenalina], PlayerInfo[playerid][jWalkie], PlayerInfo[playerid][jLeader], PlayerInfo[playerid][jTutorial], PlayerInfo[playerid][jOrigen]);
format(Query, sizeof(Query), "%s, `Sexo` = '%i', `Profesion` = '%i', `Edad` = '%i', `PorqueSalio` = '%i', `Spawn` = '%i', `Pos_x` = '%f', `Pos_y` = '%f', `Pos_z` = '%f', `Int` = '%i'", Query, PlayerInfo[playerid][jSexo], PlayerInfo[playerid][jProfesion], PlayerInfo[playerid][jAge], PlayerInfo[playerid][jPorSalio], PlayerInfo[playerid][jSpawn], PlayerInfo[playerid][jPos_x], PlayerInfo[playerid][jPos_y], PlayerInfo[playerid][jPos_z], PlayerInfo[playerid][jInt]);
format(Query, sizeof(Query), "%s, Ropa = '%i', Vida` = '%i', Armour = '%i', Nafta = '%i', Fosforos` = '%i', Botella` = '%i', Guantes` = '%i', Reporte = '%i', `Punteria` = '%i'", Query, PlayerInfo[playerid][jRopa], PlayerInfo[playerid][jVida], PlayerInfo[playerid][jArmour], PlayerInfo[playerid][jNafta], PlayerInfo[playerid][jFosforos], PlayerInfo[playerid][jBottle], PlayerInfo[playerid][jGuantes], PlayerInfo[playerid][jReport], PlayerInfo[playerid][jPunteria]);
format(Query, sizeof(Query), "%s, Mechanic = '%i', Luck = '%i', Mordedor = '%i', Zombie = '%i', Reloj = '%i', Hours = '%i', Encarcelado = '%i', TiempoDeCarcel = '%i'", Query, PlayerInfo[playerid][jMechanic], PlayerInfo[playerid][jLuck], PlayerInfo[playerid][jZombiesPT], PlayerInfo[playerid][jZombie], PlayerInfo[playerid][jReloj], PlayerInfo[playerid][jHours], PlayerInfo[playerid][jEncarcelado], PlayerInfo[playerid][jTiempoDeCarcel]);
format(Query, sizeof(Query), "%s, ZombieCa = '%i', Virus = '%i', Lente = '%i', Hat = '%i', Rank = '%i', Health = '%f'", Query, PlayerInfo[playerid][jZombieC], PlayerInfo[playerid][jVirusD], PlayerInfo[playerid][jLente], PlayerInfo[playerid][jHat], PlayerInfo[playerid][jRank], PlayerInfo[playerid][jHealth]);
// Do NOT remove this line otherwise it'll die!
format(Query, sizeof(Query), "%s WHERE id = '%i'", Query, PlayerInfo[playerid][jMySQLID]);
mysql_function_query(cHandle, Query, false, "", "");
return 1;
}
Regards
Oscii