SA-MP Forums Archive
MySQL warning - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL warning (/showthread.php?tid=179374)



MySQL warning - NoobScripter1 - 26.09.2010

Hello im making a mysql system and i get one error
Quote:

warning 201: redefinition of constant/macro (symbol "mysql_fetch_row(%1)")

I dont know what im making wrong here is my line
pawn Код:
#define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")
Its just a definitions if someone can help thank you.


Re: MySQL warning - Mauzen - 26.09.2010

The definition is an infinite macro, it calls itself. This means, mysql_fetch_row(%1) is replaced by mysql_fetch_row(%1,"|") and this is replaced again and so on. To fix this, you would need to change the name a bit, like

pawn Код:
#define mysql_fetch_row_2(%1) mysql_fetch_row_format(%1,"|")