BDD Connection
#1

Hello.

I've this code :

Код:
forward ConnectMysql();
ConnectMysql()
{
	mysql_connect(SQL_HOST, SQL_USER, SQL_BDD, SQL_PASSWORD);

    if(mysql_ping() == 1)
    {
    	mysql_debug(1);
	    printf("[MYSQL] : La connexion а `%s` a rйussi !", SQL_BDD);
	}
	else
	{
	    printf("[MYSQL][ERROR] : La connexion а `%s` a йchouй !", SQL_BDD);
	}
	return 1;
}
The constants are defined and verified.

I tried to use ConnectMysql () at the beginning of the script after the includes.
The problem: I have received no message about loading the BDD.

I tried the OnGameModeInit and I tried to put before the public ConnectMysql function.

In both cases: Script[gamemodes/mygm.amx]: Run time error 19: "File or function is not found"

Can you help me please ?

PS: I put it at the beginning of the script (after the includes) in order to use it to declare variables ...

Thanks !
Reply
#2

Do you load the MySQL plugin?
Reply
#3

Yes, and i've got any error.
Reply
#4

Do you have an idea if you please?

I need the database as soon as possible!
Reply
#5

Up...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)