mysql help - 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 help (
/showthread.php?tid=629381)
mysql help -
ChromeMenu - 25.02.2017
Can anyone help with this?
PHP код:
error 021: symbol already defined: "mysql_connect"
error 025: function heading differs from prototype
error 025: function heading differs from prototype
fatal error 107: too many error messages on one line
Re: mysql help -
TopShooter2 - 25.02.2017
According to your errors, it seems that you defined 'mysql_connect' twice or more than two times, according to the other 025 errors, you got a wrong parameter with one of the public functions, the prototype must be exactly the same. Make sure that all your parameters are same, post the code of your public function and the defination of it and post the defination of it aka forward if capable.
Please show me your code and make sure to include PHP or CODE tags.
Re: mysql help -
ChromeMenu - 25.02.2017
PHP код:
stock initiateConnections() {
new
File: fhConnectionInfo = fopen("MySQL.txt", io_read);
fread(fhConnectionInfo, szQueryOutput);
fclose(fhConnectionInfo);
sscanf(szQueryOutput, "p<|>e<s[32]s[32]s[32]s[64]>", connectionInfo);
#if defined DEBUG
printf("[debug] initiateConnections() '%s', '%s', '%s', '%s'", szQueryOutput, connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
#endif
databaseConnection = mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
return true;
}
Re: mysql help -
ChromeMenu - 25.02.2017
Does anyone know how I can fix, this? I still can not figure it out.
Re: mysql help -
GoldenLion - 25.02.2017
Код:
databaseConnection = mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
What are these parentheses doing there?
Re: mysql help -
ISmokezU - 25.02.2017
Try removing the line, since it's saying that it's already defined.
Код:
databaseConnection = mysql_connect()(connectionInfo[szDatabaseHostname], connectionInfo[szDatabaseUsername], connectionInfo[szDatabaseName], connectionInfo[szDatabasePassword]);
Re: mysql help -
ChromeMenu - 26.02.2017
hmm, I did and it still says shows up. But its weird because I dont have it defined at all now.
Re: mysql help -
ChromeMenu - 26.02.2017
I figured out why it that happened. I had two mysql.inc in my pawno folder but now when I try to compile it, i get an error on all any code with mysql any ideas?