SA-MP Forums Archive
mysql problem - 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 problem (/showthread.php?tid=595426)



mysql problem - StR_MaRy - 02.12.2015

hi guys i did put IM_BANK fs with DS in a mysql server and every time when i connect i need to do another acc what error can do that ? without giving me in the pawno some warnings or something like that?


Re: mysql problem - DRIFT_HUNTER - 03.12.2015

Make sure that your samp server actually connects to mysql ( mysql_ping() will return -1 if it failed )


Re: mysql problem - StR_MaRy - 03.12.2015

so can you help me if i give you my .pwn gm ? pls I'm desperate


Re: mysql problem - DRIFT_HUNTER - 03.12.2015

Find where is mysql_connect function in you script. Under it add
pawn Код:
if(mysql_ping() == -1) printf("Connection to mysql failed!");
else printf("Connected to mysql");
If you find Connected to mysql in console, you are fine, if not than check you connection details (username, pass,etc...)


Re: mysql problem - StR_MaRy - 03.12.2015

i did is ok ... can i give you the .pwn ?


Re: mysql problem - DRIFT_HUNTER - 03.12.2015

First i dont like doing other people's work, i can help and explain it 10 times if someone wants to learn but not do the job for them. Anyway in these giving me the pwn file wont help. First i dont have the database, second we will have different credentials for database and probably different table name. Like i said in post above, i cant be more specific than that...


Re: mysql problem - StR_MaRy - 03.12.2015

Quote:

forward ConnectMySQL();
public ConnectMySQL()
{
if(mysql_connect(SQL_HOST,SQL_USER,SQL_DB,SQL_PASS ))
{
printf("[MYSQL]: Conectare la `%s` a avut succes!",SQL_DB);
}
else
{
printf("[MYSQL]: [ERROR]: Conectare la `%s` a esuat!",SQL_DB);
}
return 1;
}

this is my mysql_connect where do i find mysql console ? and how to check my connection details username,pass in this system what i put only public onplayerconnect i add something so i think is not from there i think i did add something from INI on mysql and don't know how i didn't get error , and i added public onpropupdate from INI and in this mysql i have OnPlayerUpdateEx instead on onpropupdate so maybe that is the problem ... that why i wanted to give you the .pwn maybe you can watch faster