mysql save.
#1

Hi peoples. I don't know what happin here:

Код:
format(Query, sizeof(Query),"UPDATE `playerdata` SET `Pinigai` = '%d',`Banke` = '%d',`Patirtis` = '%d',`Admin` = '%d',`Vip` = '%d',`Darbas` = '%s',`Drabuziai` = '%d',`Uniforma` = '%d',`Direktorius` = '%s',`Gaudomas` = '%d',`Kalejime` = '%d',`Kreditai` = '%d',`Nuzudymai` = '%d',`Mirtys` = '%d',
Why i get errors:

Код:
C:\Program Files\Samp serveriai\NAUJAUSIAS SAMP SERVERIS\gamemodes\freeroam.pwn(4680) : error 037: invalid string (possibly non-terminated string)
C:\Program Files\Samp serveriai\NAUJAUSIAS SAMP SERVERIS\gamemodes\freeroam.pwn(4680) : error 017: undefined symbol "UPDATE"
C:\Program Files\Samp serveriai\NAUJAUSIAS SAMP SERVERIS\gamemodes\freeroam.pwn(4680) : error 029: invalid expression, assumed zero
C:\Program Files\Samp serveriai\NAUJAUSIAS SAMP SERVERIS\gamemodes\freeroam.pwn(4680) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Forgot a " at the end?

pawn Код:
format(Query, sizeof(Query),"UPDATE `playerdata` SET `Pinigai` = '%d',`Banke` = '%d',`Patirtis` = '%d',`Admin` = '%d',`Vip` = '%d',`Darbas` = '%s',`Drabuziai` = '%d',`Uniforma` = '%d',`Direktorius` = '%s',`Gaudomas` = '%d',`Kalejime` = '%d',`Kreditai` = '%d',`Nuzudymai` = '%d',`Mirtys` = '%d'",
Reply
#3

maybe,but one more: how to make new line? because i save a lot of things,and i get error,"line is too long".
Reply
#4

You have to use an escape character..

Normal:
pawn Код:
format(something, sizeof(something), "Something is HERE");
And split into two lines:
pawn Код:
format(something, sizeof(something), "Something is \
HERE"
);
That character will let you continue the string on a new line.
Reply
#5

Maybe can say what is bad here?

Код:
format(Query,sizeof(Query),"SELECT Pinigai,Banke,Patirtis,Admin,Vip,Darbas,Drabuziai,Uniforma,Direktorius,Gaudomas,Kalejime,Kreditai,Nuzudymai,Mirtys,zMasina,zMasina2,Remontas,Remontas2,X_pozicija,Y_pozicija,Z_pozicija,Interjeras,Pastatas,Namas,Banas,VipLaikas,VipLaikas2, \
PINkodas,Ginklas0,Soviniai0,Ginklas1,Soviniai1,Ginklas2,Soviniai2,Ginklas3,Soviniai3,Ginklas4,Soviniai4,Ginklas5,Soviniai5,Ginklas6,Soviniai6,Ginklas7,Soviniai7,Ginklas8,Soviniai8,Ginklas9,Soviniai9,Ginklas10,Soviniai10,Ginklas11,Soviniai11 FROM playerdata WHERE Vardas = '%s'", PlayerName(playerid));
I get error line is too long...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)