MySQL connect
#1

I have some warnings, i believe this is why i get a error 19 on samp-server
pawn Код:
#define MYSQL_HOST "Wont Show"
#define MYSQL_USER "Wont show"
#define MYSQL_PASS "Wont show"
#define MYSQL_DB   "erpgserver"
I removed the IP and other because of hackers.

pawn Код:
public MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[])
{
    FuncLog("MySQLConnect");
    print("MYSQL: Attempting to connect to server...");
    new MySQL:connection;
    mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, connection, 1);
    if(mysql_ping() == 0)
    {
        print("MYSQL: Database connection established.");
        return 1;
    }
    else
    {
        print("MYSQL: Could not connect! Retrying...");
        mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, connection, 1);
        if(mysql_ping()==0)
        {
           
            return 1;
        }
        else
        {
            print("MYSQL: Could not reconnect to Database! Terminating server...");
            SendRconCommand("exit");
            return 0;
        }
    }
}
pawn Код:
WCRP.pwn(48915) : warning 213: tag mismatch
WCRP.pwn(48915) : warning 202: number of arguments does not match definition
WCRP.pwn(48924) : warning 213: tag mismatch
WCRP.pwn(48924) : warning 202: number of arguments does not match definition
Reply


Messages In This Thread
MySQL connect - by dannyk0ed - 25.05.2012, 01:59
Re: MySQL connect - by SuperViper - 25.05.2012, 02:04
Re: MySQL connect - by dannyk0ed - 25.05.2012, 02:08
Re: MySQL connect - by Pizzy - 25.05.2012, 02:13
Re: MySQL connect - by dannyk0ed - 25.05.2012, 02:15
Re: MySQL connect - by Pizzy - 25.05.2012, 02:44
Re: MySQL connect - by Vince - 25.05.2012, 07:57
Re: MySQL connect - by qinaixiuor - 25.05.2012, 08:48
Re: MySQL connect - by Kirollos - 25.05.2012, 09:34
Re: MySQL connect - by MadeMan - 25.05.2012, 09:39

Forum Jump:


Users browsing this thread: 1 Guest(s)