Hey Leute ich habe ein Problem und zwar habe ich einen Error in meiner Query ich weiß echt nicht was ich falsch mache.
Error
[17:43:01] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Das steht in der Server log
[17:43:01] UPDATE autos SET model='560',x='-2708.979980',y='203.348999',z='4.179689',a='349.032989',color1='0',color2='0',vmod0='0',v
hier die Query Funktion
Code
public OnPlayerDisconnect(playerid, reason)
{
if(sInfo[playerid][eingeloggt]==1)
{
new Float:x,Float:y,Float:z,query[128];
GetPlayerPos(playerid,x,y,z);
format(query,sizeof query,"UPDATE samp SET x='%f',y='%f',z='%f' WHERE id='%i'",x,y,z,sInfo[playerid][s_id]);
mysql_function_query(dbhandle,query,false,"","");
}
for(new i=0;i<sizeof(cInfo); i++)
{
new query[1200];
if(cInfo[i][id_x]==0)continue;
if(cInfo[i][besitzer]!=sInfo[playerid][s_id])continue;
format(query,123,"UPDATE autos SET model='%i',x='%f',y='%f',z='%f',a='%f',color1='%i',color2='%i',vmod0='%i',vmod1='%i',vmod2='%i',vmod3='%i',vmod4='%i',vmod5='%i',vmod6='%i',vmod7='%i',vmod8='%i',vmod9='%i',vmod10='%i',vmod11='%i',vmod12='%i',vmod13='%i' WHERE id='%i'",
cInfo[i][model],cInfo[i][c_X],cInfo[i][c_Y],cInfo[i][c_Z],cInfo[i][c_R],cInfo[i][vmod0],cInfo[i][vmod1],cInfo[i][vmod2],cInfo[i][vmod3],cInfo[i][vmod4],cInfo[i][vmod5],cInfo[i][vmod6],cInfo[i][vmod7],cInfo[i][vmod8],cInfo[i][vmod9],cInfo[i][vmod10],cInfo[i][vmod11],
cInfo[i][vmod12],cInfo[i][vmod13],cInfo[i][db_id]);
mysql_function_query(dbhandle,query,false,"","");
print(query);
}
savePlayer(playerid);
resetPlayer(playerid);
return 1;
}
Alles anzeigen
Hoffe ihr wisst weiter