SA-MP Forums Archive
Mysql mysql_format error or something help me pls - 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: Mysql mysql_format error or something help me pls (/showthread.php?tid=549169)



Mysql mysql_format error or something help me pls - RafaelZam - 05.12.2014

pawn Код:
.pwn(1182) : warning 213: tag mismatch
.pwn(1182) : warning 213: tag mismatch
.pwn(1182) : warning 213: tag mismatch
.pwn(1182) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Warnings.
this is the line


this is the line
pawn Код:
new query[128];
        mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Adminlevel`=%d, `DonorRank`=%d, `Money`=%d, `Scores`=%d, `Kills`=%d, `Deaths`=%d, `Ranks`=%d WHERE `IDs`=%d",\
        pInfo[playerid][Adminlevel], pInfo[playerid][DonorRank], pInfo[playerid][Money], pInfo[Scores], pInfo[Kills], pInfo[Deaths], pInfo[Ranks], pInfo[playerid][IDs]); //this line 1181
        mysql_tquery(mysql, query, "", "");
please help me idk what imma doing bad :v :C
please, :c


Re: Mysql mysql_format error or something help me pls - M4D - 05.12.2014

pInfo[money], pInfo[Ranks] and other variables don't need "[playerid]" ?
For example pInfo[playerid][money] ?


Re: Mysql mysql_format error or something help me pls - Sawalha - 05.12.2014

pawn Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Adminlevel`=%d, `DonorRank`=%d, `Money`=%d, `Scores`=%d, `Kills`=%d, `Deaths`=%d, `Ranks`=%d WHERE `IDs`=%d",
        pInfo[playerid][Adminlevel], pInfo[playerid][DonorRank], pInfo[playerid][Money], pInfo[playerid][Scores], pInfo[playerid][Kills], pInfo[playerid][Deaths], pInfo[playerid][Ranks], pInfo[playerid][IDs]); //this line 1181
As he said ^, you forgot to add [playerid] to them


Respuesta: Mysql mysql_format error or something help me pls - RafaelZam - 06.12.2014

Thank you ! i was blind !
thank you very much !