Mysql Error 1064 Help needed
#1

Hello ,

I`ve looked at the problem already and couldn`t find the source of the error .

pawn Код:
[15:11:15] Error #1064 - Error: 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 | Query: UPDATE players SET Health = '100.000000', Armour = '0.000000', PosX = '1781.441162', PosY = '1966.091064', PosZ = '5.328877', PosR = '296.922332', Interior = 0, Skin = 147, Admin = 1, Team = 0, Infected = 0, Rations = 0, Radio = 0, Mask = 0, Cuffs = 0, Blindfold = 0, Radioused = 0, Maskused = 0, Watchused = 0, Watch = 0, Armor = 0, Bandage = 0, Medicine = 4 WHERE ID =
Can anyone see the problem ?

If you need more info just ask .
Reply
#2

Where did you get that error?
Console, compiler, web?

Also, don't use ' ' for numbers, just for strings.
Reply
#3

Console and its a string
Reply
#4

Give me the line.
Reply
#5

pawn Код:
format(szQuery, sizeof(szQuery), "UPDATE players SET Health = '%f', Armour = '%f', PosX = '%f', PosY = '%f', PosZ = '%f', PosR = '%f'", playerVariables[playerid][pHealth], playerVariables[playerid][pArmour], playerVariables[playerid][pPos][0], playerVariables[playerid][pPos][1], playerVariables[playerid][pPos][2], playerVariables[playerid][pPos][3]);
    format(szQuery, sizeof(szQuery), "%s, Interior = %d, Skin = %d, Admin = %d, Team = %d, Infected = %d, Rations = %d, Radio = %d, Mask = %d, Cuffs = %d, Blindfold = %d, Radioused = %d, Maskused = %d, Watchused = %d, Watch = %d, Armor = %d, Bandage = %d, Medicine = %d, First = %d WHERE ID = %d",szQuery,
    playerVariables[playerid][pInterior], playerVariables[playerid][pSkin], playerVariables[playerid][pAdmin], playerVariables[playerid][pTeam], playerVariables[playerid][pInfected],  playerVariables[playerid][pRations], playerVariables[playerid][pRadio],  playerVariables[playerid][pMask], playerVariables[playerid][pCuffs], playerVariables[playerid][pBlindfold], playerVariables[playerid][pRadioused],
    playerVariables[playerid][pWatchused], playerVariables[playerid][pWatch], playerVariables[playerid][pArmor], playerVariables[playerid][pBandage], playerVariables[playerid][pMedicine], playerVariables[playerid][pFirst], playerVariables[playerid][pDBID]);
    mysql_query(szQuery, THREAD_NO_RESULT, playerid, iConnectionHandle);
Reply
#6

WHERE ID = it cuts of right there, so try increasing the size of your szQuery.
Reply
#7

Did increase the size it didnt work ;(
Reply
#8

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
Where did you get that error?
Console, compiler, web?

Also, don't use ' ' for numbers, just for strings.
' ' can be used on numbers to better organize your query. Some people enjoy making their script look better.
Reply
#9

Tried deleting them to it didnt help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)