new
Query[700+1000],
Query_User[700+1000]
;
format(Query, sizeof(Query), "UPDATE `USUARIOS` SET `IP` = '%s',", DB_Escape(TK_USER[playerid][TK_IP]));
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Admin` = '%i',", TK_USER[playerid][TK_Admin]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Admin Hide` = '%i',", TK_USER[playerid][TK_AdmHide]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Matou` = '%i',", TK_USER[playerid][TK_Kills]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Morreu` = '%i',", TK_USER[playerid][TK_Deaths]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Pontos` = '%i',", TK_USER[playerid][TK_Score]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Dinheiro` = '%i',", TK_USER[playerid][TK_Money]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Cash` = '%i',", TK_USER[playerid][TK_Cash]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Aviso` = '%i',", TK_USER[playerid][TK_Warn]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Calado` = '%i',", TK_USER[playerid][TK_Muted]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Tempo Calado` = '%i',", TK_USER[playerid][TK_MuteSec]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`CMD Block` = '%i',", TK_USER[playerid][TK_CMuted]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Tempo CMD Block` = '%i',", TK_USER[playerid][TK_CMuteSec]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Preso` = '%i',", TK_USER[playerid][TK_Jail]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Tempo Preso` = '%i',", TK_USER[playerid][TK_JailSec]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Horas` = '%i',", TK_USER[playerid][TK_Game][2]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Minutos` = '%i',", TK_USER[playerid][TK_Game][1]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Segundos` = '%i',", TK_USER[playerid][TK_Game][0]);
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Pergunta` = '%s',", DB_Escape(TK_USER[playerid][TK_Question]));
strcat(Query_User, Query);
format(Query, sizeof(Query), "`Resposta` = '%s'", DB_Escape(TK_USER[playerid][TK_Answer]));
strcat(Query_User, Query);
format(Query, sizeof(Query), "WHERE `Nome` = '%s'", DB_Escape(TK_USER[playerid][TK_Name]));
strcat(Query_User, Query);
db_query(User_Database, Query);
db_free_result(db_query(User_Database, Query));
Pra comecar tu esta usando a versao mais recente do samp? se sim nao precisa mais disto: DB_Escape use %q que ja faz "escape" automatico.
Alem do mais voce deveria usar apenas uma format como eu disse no outro post, fica organizado na mesma e evita problemas como este. |
format(Query, sizeof(Query), "UPDATE `USUARIOS` SET `IP` = '%s', `Admin` = '%i', `Admin Hide` = '%i', `Matou` = '%i', `Morreu` = '%i', `Pontos` = '%i', `Dinheiro` = '%i', `Cash` = '%i', `Avisos` = '%i', `Calado` = '%i', `Tempo Calado` = '%i', `CMD Block` = '%i', `Tempo CMD Block` = '%i', `Preso` = '%i', `Tempo Preso` = '%i', `Horas` = '%i', `Minutos` = '%i', `Segundos` = '%i', `Pergunta` = '%s', `Resposta` = '%s' WHERE `Nome` = '%s'",
DB_Escape(TK_USER[playerid][TK_IP]),
TK_USER[playerid][TK_Admin],
TK_USER[playerid][TK_AdmHide],
TK_USER[playerid][TK_Kills],
TK_USER[playerid][TK_Deaths],
TK_USER[playerid][TK_Score],
TK_USER[playerid][TK_Money],
TK_USER[playerid][TK_Cash],
TK_USER[playerid][TK_Warn],
TK_USER[playerid][TK_Muted],
TK_USER[playerid][TK_MuteSec],
TK_USER[playerid][TK_CMuted],
TK_USER[playerid][TK_CMuteSec],
TK_USER[playerid][TK_Jail],
TK_USER[playerid][TK_JailSec],
TK_USER[playerid][TK_Game][2],
TK_USER[playerid][TK_Game][1],
TK_USER[playerid][TK_Game][0],
DB_Escape(TK_USER[playerid][TK_Question]),
DB_Escape(TK_USER[playerid][TK_Answer]),
DB_Escape(TK_USER[playerid][TK_Name])
);
db_query(User_Database, Query);
db_free_result(db_query(User_Database, Query));