another Mysql error!
#1

All good, now got that error,

pawn Код:
*****.pwn(182) : error 017: undefined symbol "mysql_errno"
Line "182"

pawn Код:
if(mysql_errno(MainPipeline) != 0)
All the Script>

pawn Код:
stock g_mysql_Init()
{
    new SQL_HOST[64], SQL_DB[64], SQL_USER[32], SQL_PASS[128], SQL_DEBUG, SQL_DEBUGLOG;
    new SQL_SHOST[64], SQL_SDB[64], SQL_SUSER[32], SQL_SPASS[128];
    new fileString[128], File: fileHandle = fopen("mysql.cfg", io_read);

    while(fread(fileHandle, fileString, sizeof(fileString))) {
        if(ini_GetValue(fileString, "HOST", SQL_HOST, sizeof(SQL_HOST))) continue;
        if(ini_GetValue(fileString, "DB", SQL_DB, sizeof(SQL_DB))) continue;
        if(ini_GetValue(fileString, "USER", SQL_USER, sizeof(SQL_USER))) continue;
        if(ini_GetValue(fileString, "PASS", SQL_PASS, sizeof(SQL_PASS))) continue;
        if(ini_GetInt(fileString, "SHOPAUTOMATED", ShopToggle)) continue;
        if(ini_GetValue(fileString, "SHOST", SQL_SHOST, sizeof(SQL_SHOST))) continue;
        if(ini_GetValue(fileString, "SDB", SQL_SDB, sizeof(SQL_SDB))) continue;
        if(ini_GetValue(fileString, "SUSER", SQL_SUSER, sizeof(SQL_SUSER))) continue;
        if(ini_GetValue(fileString, "SPASS", SQL_SPASS, sizeof(SQL_SPASS))) continue;
        if(ini_GetInt(fileString, "SERVER", servernumber)) continue;
        if(ini_GetInt(fileString, "DEBUG", SQL_DEBUG)) continue;
        if(ini_GetInt(fileString, "DEBUGLOG", SQL_DEBUGLOG)) continue;
    }
    fclose(fileHandle);

    mysql_log(SQL_DEBUG, SQL_DEBUGLOG);
    MainPipeline = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);

    printf("[MySQL] (Main Pipelines) Connecting to %s...", SQL_HOST);
    if(mysql_errno(MainPipeline) != 0)
    {
        printf("[MySQL] (MainPipeline) Fatal Error! Could not connect to MySQL: Host %s - DB: %s - User: %s", SQL_HOST, SQL_DB, SQL_USER);
        print("[MySQL] Note: Make sure that you have provided the correct connection credentials.");
        printf("[MySQL] Error number: %d", mysql_errno(MainPipeline));
        SendRconCommand("exit");
    }
    else print("[MySQL] (MainPipeline) Connection successful toward MySQL Database Server!");

    if(ShopToggle == 1)
    {
        ShopPipeline = mysql_connect(SQL_SHOST, SQL_SUSER, SQL_SDB, SQL_SPASS);

        printf("[MySQL] (Shop Pipelines) Connecting to %s...", SQL_SHOST);
        if(mysql_errno(ShopPipeline) != 0)
        {
            printf("[MySQL] (ShopPipeline) Fatal Error! Could not connect to MySQL: Host %s - DB: %s - User: %s", SQL_SHOST, SQL_SDB, SQL_SUSER);
            print("[MySQL] Note: Make sure that you have provided the correct connection credentials.");
            printf("[MySQL] Error number: %d", mysql_errno(ShopPipeline));
            //SendRconCommand("exit");
        }
        else print("[MySQL] (ShopPipeline) Connection successful toward MySQL Database Server!");
    }
   
    InitiateGamemode(); // Start the server

    return 1;
}
Thx for help +rep!
Reply
#2

FIXED! I`ve Replaced mysql_errno with MySQL_close
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)