Mysql unregistered problems.
#1

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.
Reply
#2

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.
Reply
#3

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.
Reply
#4

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
Reply
#5

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.
Reply
#6

Here:

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

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


Forum Jump:


Users browsing this thread: 6 Guest(s)