mysql plugin
#1

HI all,

Just downloaded the mysql plugin files and placed them in the right folder but when I edit the PWN file with my mysql information and try to compile it, it says "fatal error 100: cannot read from file: 'mysql'".

Could anyone help me with this?


--
When I change it to #include <a_mysql> it gives me an undefined symbol on "mysql_init" & "mysql_query".
Reply
#2

Did you extracted the a_mysql.inc include from the plugin package and placed it in your pawno/include folder ?
Reply
#3

Quote:
Originally Posted by Xtreme_playa
View Post
Did you extracted the a_mysql.inc include from the plugin package and placed it in your pawno/include folder ?
Sure :_)
Reply
#4

Then just recompile your script again.
Reply
#5

Got undefined symbols "mysql_init" and "mysql_query".
Reply
#6

Make sure you symbols are defined in your script, simple.
Reply
#7

Quote:
Originally Posted by ColorHost-Kevin
View Post
Make sure you symbols are defined in your script, simple.
Those symbols are already defined in the mysql plugin include and are not to be defined in script.
Reply
#8

Im using this MySQL plugin https://sampforum.blast.hk/showthread.php?tid=56564 and the gPos (https://sampforum.blast.hk/showthread.php?tid=315847) where automaticlly #include is added.

So I guess it should work when I'll extract these files in the right maps and edit the server.cfg?
And compile the pwn with the right info etc.etc. haha :P


Or is it a big problem when im using the windows R5, 6 or 7 version?
Since I can't find an plugin that is for server 0.3d R2?
Reply
#9

That gPos won't work with BlueG's plugin.
Reply
#10

Quote:
Originally Posted by kryptonice
View Post
Got undefined symbols "mysql_init" and "mysql_query".
Try this include
Code:
/*
    SA-MP MySQL plugin R5
    Copyright © 2008-2010, G-sTyLeZzZ
*/

#if defined mysql_included
    #endinput
#endif
#define mysql_included

//Common error codes (http://dev.mysql.com/doc/refman/5.0/...t|server).html)

#define ER_DBACCESS_DENIED_ERROR 1044
#define ER_ACCESS_DENIED_ERROR 1045
#define ER_UNKNOWN_TABLE 1109
#define ER_SYNTAX_ERROR 1149
#define CR_SERVER_GONE_ERROR 2006
#define CR_SERVER_LOST 2013
#define CR_COMMAND_OUT_OF_SYNC 2014
#define CR_SERVER_LOST_EXTENDED 2055

//Native functions

#define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")
#define mysql_next_row() mysql_retrieve_row()
#define mysql_get_field(%1,%2) mysql_fetch_field_row(%2,%1)

native mysql_affected_rows(connectionHandle = 1);
native mysql_close(connectionHandle = 1);
native mysql_connect(const host[],const user[],const database[],const password[]);
native mysql_debug(enable = 1);
native mysql_errno(connectionHandle = 1);
native mysql_fetch_int(connectionHandle = 1);
native mysql_fetch_field(number,dest[],connectionHandle = 1);
native mysql_fetch_field_row(string[],const fieldname[],connectionHandle = 1);
native mysql_fetch_float(&Float:result,connectionHandle = 1);
native mysql_fetch_row_format(string[],const delimiter[] = "|",connectionHandle = 1);
native mysql_format(connectionHandle = 1, output[], format[], {Float,_}:...);
native mysql_field_count(connectionHandle = 1);
native mysql_free_result(connectionHandle = 1);
native mysql_get_charset(destination[],connectionHandle = 1);
native mysql_insert_id(connectionHandle = 1);
native mysql_num_rows(connectionHandle = 1);
native mysql_num_fields(connectionHandle = 1);
native mysql_ping(connectionHandle = 1);
native mysql_query(query[],resultid = (-1),extraid = (-1), connectionHandle = 1);
native mysql_query_callback(index,query[],callback[],extraid = (-1), connectionHandle = 1);
native mysql_real_escape_string(const source[],destination[], connectionHandle = 1);
native mysql_reconnect(connectionHandle = 1);
native mysql_reload(connectionHandle = 1);
native mysql_retrieve_row(connectionHandle = 1);
native mysql_set_charset(charset[],connectionHandle = 1);
native mysql_stat(const destination[],connectionHandle = 1);
native mysql_store_result(connectionHandle = 1);
native mysql_warning_count(connectionHandle = 1);

//forward declarations

forward OnQueryFinish(query[], resultid, extraid, connectionHandle);
forward OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)