BDD Connection - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: BDD Connection (
/showthread.php?tid=275865)
BDD Connection -
Urefeu - 11.08.2011
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 !
Re: BDD Connection -
MadeMan - 11.08.2011
Do you load the MySQL plugin?
Re : BDD Connection -
Urefeu - 11.08.2011
Yes, and i've got any error.
Re : BDD Connection -
Urefeu - 11.08.2011
Do you have an idea if you please?
I need the database as soon as possible!
Re : BDD Connection -
Urefeu - 12.08.2011
Up...