SA-MP Forums Archive
undefined symbol "mysql" - 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: undefined symbol "mysql" (/showthread.php?tid=559980)



undefined symbol "mysql" - fonia5 - 26.01.2015

For some reason am randomly getting undefined symbol "mysql" on this line.

it's showing on both of them.
Код:
mysql = mysql_connect(HOST, USER, DATABASE, PASSWORD);
if(mysql_errno(mysql) != 0) print("Could not connect to database!");



Re: undefined symbol "mysql" - dominik523 - 26.01.2015

Where did you define a mysql variable?


Re: undefined symbol "mysql" - fonia5 - 26.01.2015

LOL am such a noob fixed it it was the static i placed it under ongamemodeinit by mistake.

Such a pointless post.


Re: undefined symbol "mysql" - dominik523 - 26.01.2015

Yup, you are missing "new mysql;" in your script.
This will be good:
Код:
// Mysql
#define HOST "localhost"
#define USER "root"
#define DATABASE "123"
#define PASSWORD "Beta"

new mysql;