Is the string too small for this query, or am I looking at it wrong?
#1

Код:
[12:04:05] [ERROR] CMySQLQuery::Execute[()] - (error #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 '`level` = '0', `SpawnLoc` = '0', `int` = '0', `vw` = '0' WHERE `Username` = 'Arn' at line 1
I wouldn't imagine the string is too small as it is called VAR3000[3000];??
Reply
#2

Post the format line here.
Reply
#3

pawn Код:
format(VAR3000, sizeof(VAR3000), "UPDATE `samp_users` SET `money` = '%d', `skin` = '%d', `age` = '%d', `ip` = '%s', `health` = '%f', `armour` = '%f', `gender` = '%d', `faction` = '%d', `pDisX` = '%f', `pDisY` = '%f', `pDisZ` = '%f', `pDisA` = '%f' `level` = '%d', `SpawnLoc` = '%d', `int` = '%d', `vw` = '%d' WHERE `Username` = '%e'",
        Account[playerid][Money], Account[playerid][pSkin], Account[playerid][pAge], PlayerIP[playerid],
        Account[playerid][pHealth], Account[playerid][pArmour], Account[playerid][pGender], faction, pX1, pY1, pZ1, A, Account[playerid][pLevel], spawnLoc, interior, virtualWorld, Name[playerid]);
Reply
#4

pawn Код:
format(VAR3000, sizeof(VAR3000), "UPDATE `samp_users` SET `money` = '%d', `skin` = '%d', `age` = '%d', `ip` = '%s', `health` = '%f', `armour` = '%f', `gender` = '%d', `faction` = '%d', `pDisX` = '%f', `pDisY` = '%f', `pDisZ` = '%f', `pDisA` = '%f', `level` = '%d', `SpawnLoc` = '%d', `int` = '%d', `vw` = '%d' WHERE `Username` = '%e'",
        Account[playerid][Money], Account[playerid][pSkin], Account[playerid][pAge], PlayerIP[playerid],
        Account[playerid][pHealth], Account[playerid][pArmour], Account[playerid][pGender], faction, pX1, pY1, pZ1, A, Account[playerid][pLevel], spawnLoc, interior, virtualWorld, Name[playerid]);
Try this.

You forgot a comma right over here.

format(VAR3000, sizeof(VAR3000), "UPDATE `samp_users` SET `money` = '%d', `skin` = '%d', `age` = '%d', `ip` = '%s', `health` = '%f', `armour` = '%f', `gender` = '%d', `faction` = '%d', `pDisX` = '%f', `pDisY` = '%f', `pDisZ` = '%f', `pDisA` = '%f' ,`level` = '%d', `SpawnLoc` = '%d', `int` = '%d', `vw` = '%d' WHERE `Username` = '%e'", Account[playerid][Money], Account[playerid][pSkin], Account[playerid][pAge], PlayerIP[playerid],
Account[playerid][pHealth], Account[playerid][pArmour], Account[playerid][pGender], faction, pX1, pY1, pZ1, A, Account[playerid][pLevel], spawnLoc, interior, virtualWorld, Name[playerid]);
Reply
#5

Fixed it,

forgot to add a few fields
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)