SA-MP Forums Archive
Mysql Error using the Mysql 2.1.1 Plugin - 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 Error using the Mysql 2.1.1 Plugin (/showthread.php?tid=347061)



Mysql Error using the Mysql 2.1.1 Plugin - yvoms - 31.05.2012

Code:
Public OnFilterScriptInit
{
 	Connection = mysql_init();
	mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE, Connection, 1);
	return true;
}
Gives me the following error's

Code:
error 017: undefined symbol "mysql_init"
warning 213: tag mismatch
warning 213: tag mismatch
warning 202: number of arguments does not match definition
On the following 2 lines:

Code:
 	Connection = mysql_init();
	mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE, Connection, 1);



Re: Mysql Error using the Mysql 2.1.1 Plugin - SomebodyAndMe - 31.05.2012

Add at the top of your script:
pawn Code:
new MySQL:Connection;

// and replace your mysql_init with this
mysql_init(LOG_ALL);



Re: Mysql Error using the Mysql 2.1.1 Plugin - madoff - 07.06.2013

include update

#include <mysql> just do not a_mysql I have such a problem has been)