SA-MP Forums Archive
Mysql unregistered problems. - 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 unregistered problems. (/showthread.php?tid=482759)



Mysql unregistered problems. - iSkate - 22.12.2013

Hey guys, I'm using a gm and it gives errors :-

Error : Function not registered : mysql_query
Error : Function not registered : mysql_fetch_int

i heard that mysql_query has been changed to mysql_function_query, can someone tell my how to change mysql_query to mysql_function_query.

P.S : I'm using BlueG's mysql plugin and inc.

And please help me with mysql_fetch_int too. Guys please help me i really need help.


Re: Mysql unregistered problems. - Emmet_ - 22.12.2013

You're using an older version of an include, but a newer version of the plugin.

I suggest you to do this:

pawn Код:
#if defined mysql_query
    #undef mysql_query
#endif

#define mysql_query(%0) \
    (mysql_function_query(1, %0, false, "OnQueryFinish", ""))

forward OnQueryFinish(); public OnQueryFinish() {}
Make sure you update your include AND plugin to MySQL R7 to be able to use it.


Re: Mysql unregistered problems. - Konstantinos - 22.12.2013

a_mysql.inc is for R6 and you've compiled it fine. It uses mysql_query and mysql_fetch_int.
mysql.dll or mysql.so (depending on the operating system) is not for R6, but higher which mysql_query has been removed. So load the plugin with the correct version (as the include).

Or (recommended) use R7/R34 with threaded queries.


Re: Mysql unregistered problems. - iSkate - 22.12.2013

thx guys but now im having this error...

https://sampforum.blast.hk/showthread.php?tid=295331

:/

ADDITIONAL LINKS : http://forum.sa-mp.com/showthread.ph...01#post2830101


Re: Mysql unregistered problems. - iSkate - 22.12.2013

sorry to double post but i cant define mysql_fetch_int. And does any one know about a_westie.inc ? please i need that if you have the link, kindly post it here.


Re: Mysql unregistered problems. - Emmet_ - 22.12.2013

Here:

pawn Код:
stock mysql_fetch_int()
{
    static
        gIntValue[24];

    cache_get_row(0, 0, gIntValue, 1);
    return strval(gIntValue);