SA-MP Forums Archive
mysql_connect - error - 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_connect - error (/showthread.php?tid=308941)



mysql_connect - error - Danielo - 05.01.2012

mysql_connect( HOST_ADDR, HOST_USER, HOST_PASS, HOST_DATA ); - that's at OnGameModeInIt
native mysql_connect(const host[], const user[], const pass[], const db[], MySQL:handle = (MySQL:0), auto_reconnect = 0); - this one is used in mysql.inc

Gives me this error:
[21:20:50] Function: mysql_connect called with incorrect parameter count.

What's wrong?

PS: I'm using StrikenKid's plugin.


SOLVED
new MySQL:connection = mysql_init(LOG_ONLY_ERRORS, 1);
mysql_connect("hostname", "username", "password", "database", connection, 1);



UNSOLVED
Now it connects to the database but it still doesn't load it!
What can I do?


Re: mysql_connect - error - Danielo - 05.01.2012

Help please!