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


Messages In This Thread
BDD Connection - by Urefeu - 11.08.2011, 13:03
Re: BDD Connection - by MadeMan - 11.08.2011, 13:05
Re : BDD Connection - by Urefeu - 11.08.2011, 13:25
Re : BDD Connection - by Urefeu - 11.08.2011, 14:46
Re : BDD Connection - by Urefeu - 12.08.2011, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)