SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/09/2012, 07:36 PM   #1
rati555
Big Clucker
 
rati555's Avatar
 
Join Date: May 2010
Location: Georgia/Tbilisi
Posts: 192
Reputation: 20
Default An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds....

pawn Code:
format(Query, sizeof(Query), "INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings) VALUES (%d, 0, 'The State', %s,%f,%f,%f,%f,%f,%f,%d,%d,0,0,0,0,%d,1,0,0,0,0)",
hid,Description,EntX,EntY,EntZ,ExitX,ExitY,ExitZ,Level,Value,Int);
mysql_query(Query);

Mysql Error
Code:
[23:47:41] CMySQLHandler::Query(INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings) VALUES (2, 0, 'The State', Patara Saxli,1532.328247,-1694.320800,13.382812,225.756988,1240.000000,1082.149902,4,50000,0,0,0,0,2,1,0,0,0,0)) - An error has occured. (Error ID: 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)
rati555 is offline   Reply With Quote
Old 14/09/2012, 07:45 PM   #2
Kirollos
Gangsta
 
Kirollos's Avatar
 
Join Date: Jun 2010
Location: Cairo, Egypt
Posts: 566
Reputation: 83
Default Re: An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds....

you forgot some quotes in it

Code:
format(Query, sizeof(Query), "INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings`) VALUES (%d, 0, 'The State', `%s`,%f,%f,%f,%f,%f,%f,%d,%d,0,0,0,0,%d,1,0,0,0,0)",
hid,Description,EntX,EntY,EntZ,ExitX,ExitY,ExitZ,Level,Value,Int);
mysql_query(Query);
NOTE: Mistakes are marked in bold

NOTE2: i guess you made a typo in the query in INSERT INTO (at Discription , it should be Description )
__________________
My github profile: https://github.com/Kirollos/

( ͡° ͜ʖ ͡°)
Kirollos 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] KillTimer dando erro... (error 076: syntax error in the expression, or invalid function call) Dragonborn Português/Portuguese 2 09/09/2012 04:07 AM
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
error 076: syntax error in the expression, or invalid function call [H]265 Help Archive 1 15/05/2011 11:04 AM
An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now) Tom_Dedi Help Archive 3 07/11/2010 01:01 PM
: error 076: syntax error in the expression, or invalid function call FireCat Help Archive 0 27/08/2010 10:10 PM


All times are GMT. The time now is 06:20 AM.


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