CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your
#1

I am facing a proble, while i try to save stats on mysql database...

here is the code :
PHP Code:
SavePlayer(playerid)
{
    new 
Float:x,Float:y,Float:z,Float:Angle;
    
GetPlayerFacingAngle(playeridAngle);
    
GetPlayerPos(playeridFloat:xFloat:yFloat:z);
    
sInfo[playerid][money] = GetPlayerMoney(playerid);
    
sInfo[playerid][level] = GetPlayerScore(playerid);
    
sInfo[playerid][s_posx] = x;
    
sInfo[playerid][s_posy] = y;
    
sInfo[playerid][s_posz] = z;
    
sInfo[playerid][s_angle] = Angle;
    new 
query[128];
    
format(querysizeof(query), "UPDATE users SET money='%i', level='%i', pos_x='%f', pos_y='%f', pos_z='%f', angle='%f' WHERE id='%i'"sInfo[playerid][money],sInfo[playerid][level],sInfo[playerid][s_posx],sInfo[playerid][s_posx],sInfo[playerid][s_posz],sInfo[playerid][s_angle],sInfo[playerid][db_id]);
    
mysql_function_query(dbhandlequeryfalse"""");
return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)