SA-MP Forums Archive
Saving into SQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving into SQL (/showthread.php?tid=329395)



Saving into SQL - spd_sahil - 28.03.2012

This just doesnt seem to work , i cant find the error
pawn Код:
format(Query,sizeof(Query),"UPDATE `USERS` SET SCORE = '%d', CASH = '%d',SKIN = '%d',SUB MACH = '%i',RIFLE = '%i',SHOTGUN = '%i',SNIPER = '%i',ADMINLEVEL = '%d' WHERE `NAME` = '%s' COLLATE NOCASE",
                                                                                        GetPlayerScore(playerid),
                                                                                        GetPlayerMoney(playerid),
                                                                                        GetPlayerSkin(playerid),
                                                                                        pRW[playerid],
                                                                                        pWW1[playerid],
                                                                                        pWW2[playerid],
                                                                                        pWW3[playerid],
                                                                                        Bit16_Get(g_AdminLevel, playerid),
                                                                                        DB_Escape(name));
but when i remove the
pawn Код:
SUB MACH = '%i',RIFLE = '%i',SHOTGUN = '%i',SNIPER = '%i',
it works fully


Re: Saving into SQL - spd_sahil - 28.03.2012

fixed it , i just changes SUB MACH to SUB .. maybe the words being separate was causing the problem