SA-MP Forums Archive
Need some help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Need some help! (/showthread.php?tid=360922)



Need some help! - x96664 - 19.07.2012

Hi, can somebody help me by fixing this 2 errors? :
pawn Код:
samp03e_svr\gamemodes\Gm.pwn(255) : error 017: undefined symbol "MYSQL_HOST"
samp03e_svr\gamemodes\Gm.pwn(265) : error 017: undefined symbol "MYSQL_HOST"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
And here are the lines:
pawn Код:
#include <a_mysql>

ConnectMySQL()
{
        if(mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS))//line 255
        print("[MySQL] Connection to the MySQL Database was successfully!");

    else
        print("[MySQL] Could not connect to the MySQL Database!");
}

CheckMySQL()
{
    if(mysql_ping() == -1)
        mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS);//line 265
}



Re: Need some help! - RXservers - 19.07.2012

You must define your MySQL host at the top of script.


Re: Need some help! - x96664 - 19.07.2012

Quote:
Originally Posted by RXservers
Посмотреть сообщение
You must define your MySQL host at the top of script.
The errors were because I've defined it with
Код:
#define SQL_HOST	"localhost"//I changed it to MYSQL_HOST
And thank you for the help!


Re: Need some help! - x96664 - 19.07.2012

Edit:Fixed!