What's wrong?!
#1

Код:
[14:06:33] CMySQLHandler::Query(UPDATE playerdata SET Level=1, Money=500, IP=127.0.0.1, Admin=0, Skin=299, Armour=0.000000, Health=0.000000, ConnectTime=1, PosX=50.000000, PosY=50.000000, PosZ=50.000000, PosA=0.000000, VirtualWorld) - 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 '.0.1, Admin=0, Skin=299, Armour=0.000000, Health=0.000000, ConnectTime=1, PosX=5' at line 1)
pawn Код:
format(query, sizeof(query), "UPDATE playerdata SET Level=%d, Money=%d, IP=%s, Admin=%d, Skin=%d, Armour=%f, Health=%f, \
ConnectTime=%d, PosX=%f, PosY=%f, PosZ=%f, PosA=%f, VirtualWorld=%d, Interior=%d WHERE Username = %s"
,
   
        score, money,
    ip, pInfo[playerid][pAdmin],
    skin, a,
    h, pInfo[playerid][pConnectTime],
    x, y, z, an, vw,
    inter, pName(playerid));
Reply
#2

Use ' ' around %s placeholder.

pawn Код:
format(query, sizeof(query), "UPDATE playerdata SET Level=%d, Money=%d, IP='%s', Admin=%d, Skin=%d, Armour=%f, Health=%f, \
ConnectTime=%d, PosX=%f, PosY=%f, PosZ=%f, PosA=%f, VirtualWorld=%d, Interior=%d WHERE Username = '%s'"
,
EDIT: You should've posted in Scripting Help section.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)