SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/05/2019, 12:24 PM   #1
YouShootIDodge
Big Clucker
 
Join Date: May 2019
Posts: 84
Reputation: 15
Default error

Here is the mysql log:

Code:
[01:20:45] [plugins/mysql] error #1064 while executing query "UPDATE `inventories` SET `SLOT_1` = NULL, `SLOT_2` = NULL, `SLOT_3` = NULL, `SLOT_4` = NULL, `SLOT_5` = NULL, `SLOT_6` = NULL, `SLOT_7` = NULL, `SLOT_8` = NULL, `SLOT_9` = NULL, `SLOT_10` = NULL, `SLOT_11` = NULL, `SLOT_12` = NULL, `SLOT_13` = NULL, `SLOT_14` = NULL, `SLOT_15` = NULL, `SLOT_16` = NULL WHERE `ACCOUNT_ID` = 1, ": 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
And this is the code:

Code:
	// GENERAL PLAYER DATA //
	mysql_format (mysql, string, sizeof (string), "UPDATE `players` SET ");
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`INITIATED` = %d, ", 		PlayerInfo [playerid][initiated]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`GENDER` = %d, ", 			PlayerInfo [playerid][gender]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`AGE` = %d, ", 				PlayerInfo [playerid][age]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`SKIN` = %d, ", 				PlayerInfo [playerid][skin]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`HEALTH` = %f, ", 			PlayerInfo [playerid][health]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`HUNGER` = %f, ", 			PlayerInfo [playerid][hunger]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`THIRST` = %f, ", 			PlayerInfo [playerid][thirst]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`JOB` = %d, ", 				PlayerInfo [playerid][job]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`LAST_X` = %f, ", 			PlayerInfo [playerid][last_x]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`LAST_Y` = %f, ", 			PlayerInfo [playerid][last_y]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`LAST_Z` = %f, ", 			PlayerInfo [playerid][last_z]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`LAST_INTERIOR` = %d, ", 	PlayerInfo [playerid][last_interior]);
	strcat (query, string, sizeof (string));
	
	mysql_format (mysql, string, sizeof (string), "`PLAYER_SPAWN` = %d ", 		PlayerInfo [playerid][player_spawn]);
	strcat (query, string, sizeof (string));
	
    mysql_format (mysql, string, sizeof (string), "WHERE `ACCOUNT_ID` = %d", 	PlayerInfo [playerid][account_id]);
	strcat (query, string, sizeof (string));
YouShootIDodge is offline   Reply With Quote
Old 12/05/2019, 12:37 PM   #2
Plastikmensch
Huge Clucker
 
Join Date: Aug 2016
Posts: 271
Reputation: 27
Default Re: error

Not the code for that query, but the problem with the query is that where is an ", " added at the end.
Plastikmensch is offline   Reply With Quote
Old 12/05/2019, 01:49 PM   #3
YouShootIDodge
Big Clucker
 
Join Date: May 2019
Posts: 84
Reputation: 15
Default Re: error

It's is showing this query in the log with the error.
YouShootIDodge is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] fatal error 107: too many error messages on one line Estou muito irritado já com isso NemesisBR Português/Portuguese 14 19/02/2018 12:00 AM
error 017: undefined symbol,fatal error 107: too many error messages on one line Slicebook Scripting Help 11 04/05/2014 08:30 PM
An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds.... rati555 Scripting Help 1 14/09/2012 07:45 PM
Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' Deal-or-die Scripting Help 2 25/06/2012 03:12 PM
I get tagmismatch error, But i cant find any error error Swiftz Help Archive 1 16/04/2011 04:31 AM


All times are GMT. The time now is 07:51 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.