SA-MP Forums Archive
Mysql Problem! - 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 Problem! (/showthread.php?tid=516504)



Mysql Problem! - youssefehab500 - 31.05.2014

hi i have a gang system that used mysql(strickenkid's mysql) as i remember nw i have the BlueG's mysql and tried to recompile and use again and i get these errors
Код:
filterscripts\TestGang.pwn(158) : error 035: argument type mismatch (argument 3)
filterscripts\TestGang.pwn(188) : error 017: undefined symbol "mysql_init"
filterscripts\TestGang.pwn(214) : error 017: undefined symbol "mysql_fetch_string"
filterscripts\TestGang.pwn(241) : error 035: argument type mismatch (argument 3)
filterscripts\TestGang.pwn(284) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
for these lines
Код:
158-mysql_fetch_row(Query, "|");
Код:
188-mysql_init();
Код:
214-mysql_fetch_string(gName);
Код:
241-mysql_fetch_row(Query, "|");
Код:
284-while(mysql_fetch_row(Query, "|"))



Re: Mysql Problem! - Eth - 31.05.2014

you have to update your mysql plugin and inc to the lastest new one.


Re: Mysql Problem! - youssefehab500 - 31.05.2014

Quote:
Originally Posted by Eth
Посмотреть сообщение
you have to update your mysql plugin and inc to the lastest new one.
Bro the problem that is causing is me using the latest version of mysql this script will work freat using mysqp strickenkids one I tried to fix and fixed over 26 errors these 5 I cant fix anyways thanks bro :*


Re: Mysql Problem! - Eth - 31.05.2014

replace this:
pawn Код:
mysql_fetch_row(Query, "|");
with this:
pawn Код:
mysql_fetch_row(Query);
also on the top of your gm:
pawn Код:
#define mysql_fetch_string(%0,%1) mysql_fetch_field(%0,%1)
#define mysql_fetch_int(%0,%1) mysql_fetch_field(%0,field); \%1=strval(field)
and on this line:
replace this:
pawn Код:
while(mysql_fetch_row(Query, "|"))
with this:
pawn Код:
while(mysql_fetch_row(Query))



Re: Mysql Problem! - youssefehab500 - 31.05.2014

Quote:
Originally Posted by Eth
Посмотреть сообщение
you have to update your mysql plugin and inc to the lastest new one.
Quote:
Originally Posted by Eth
Посмотреть сообщение
replace this:
pawn Код:
mysql_fetch_row(Query, "|");
with this:
pawn Код:
mysql_fetch_row(Query);
also on the top of your gm:
pawn Код:
#define mysql_fetch_string(%0,%1) mysql_fetch_field(%0,%1)
#define mysql_fetch_int(%0,%1) mysql_fetch_field(%0,field); \%1=strval(field)
and on this line:
replace this:
pawn Код:
while(mysql_fetch_row(Query, "|"))
with this:
pawn Код:
while(mysql_fetch_row(Query))
Ok gonna test thanks


Re: Mysql Problem! - youssefehab500 - 31.05.2014

Ok now done with those errors nw only 2 errors
190-error 017 undefined symbol "mysql_init"
216-error 017 undefined symbol "mysql_fetch_string
for the lines
190-mysql_init ();
216-mysql_fetch_string (gName);
And thanks


Re: Mysql Problem! - Vince - 31.05.2014

mysql_init does not exist in BlueG's plugin. I have no idea what it does. You can probably just remove it. The fetch_string should be changed to fetch_row since all rows are inherently fetched as strings.


Re: Mysql Problem! - youssefehab500 - 31.05.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
mysql_init does not exist in BlueG's plugin. I have no idea what it does. You can probably just remove it. The fetch_string should be changed to fetch_row since all rows are inherently fetched as strings.
Ok thanks bro ill do that