[Tutorial] MySQL Threaded queries with y_inline
#10

Hmm, i got this error when try remove "inline_playerid": error 017: undefined symbol "mysql_tquery_inline"
pawn Код:
stock LoadPlayerWeapon(playerid)
{
    new query[255];
    inline LoadWeaponData()
    {
        if(cache_num_rows() > 0)
        {
            for(new i = 0; i < 12; i++)
            {
                new gstr[32];
                format(gstr, sizeof gstr, "Weapon%d", i + 1);
                pInfo[playerid][pGun][i] = cache_get_field_content_int(0, gstr, MySQL);
                format(gstr, sizeof gstr, "Ammo%d", i + 1);
                pInfo[playerid][pGunAmmo][i] = cache_get_field_content_int(0, gstr, MySQL);
                if(pInfo[playerid][pGun][i] > 0 && pInfo[playerid][pGunAmmo][i] > 0)
                {
                    GivePlayerWeapon(playerid, pInfo[playerid][pGun][i], pInfo[playerid][pGunAmmo][i]);
                }
            }
        }
    }
    mysql_format(MySQL, query, sizeof query, "SELECT * FROM player_weapon WHERE UserId = %d LIMIT 1", pInfo[playerid][pID]);
    mysql_tquery_inline(MySQL, query, using inline LoadWeaponData);
}
But it's work fine when i use old way
pawn Код:
stock LoadPlayerWeapon(playerid)
{
    new query[255];
    inline LoadWeaponData(lwd_pid)
    {
        #pragma unused lwd_pid
        if(cache_num_rows() > 0)
        {
            for(new i = 0; i < 12; i++)
            {
                new gstr[32];
                format(gstr, sizeof gstr, "Weapon%d", i + 1);
                pInfo[playerid][pGun][i] = cache_get_field_content_int(0, gstr, MySQL);
                format(gstr, sizeof gstr, "Ammo%d", i + 1);
                pInfo[playerid][pGunAmmo][i] = cache_get_field_content_int(0, gstr, MySQL);
                if(pInfo[playerid][pGun][i] > 0 && pInfo[playerid][pGunAmmo][i] > 0)
                {
                    GivePlayerWeapon(playerid, pInfo[playerid][pGun][i], pInfo[playerid][pGunAmmo][i]);
                }
            }
        }
    }
    mysql_format(MySQL, query, sizeof query, "SELECT * FROM player_weapon WHERE UserId = %d LIMIT 1", pInfo[playerid][pID]);
    mysql_tquery_inline(MySQL, query, using inline LoadWeaponData, "i", playerid);
}
Already try to replace using inline LoadWeaponData to "LoadWeaponData" and got: warning 213: tag mismatch

P/S: MYSQL r39-2 and YSI 4.0 last version
Reply


Messages In This Thread
MySQL Threaded queries with y_inline - by Jay_ - 03.12.2014, 22:26
Re: MySQL Threaded queries with y_inline - by PT - 04.12.2014, 08:53
Re: MySQL Threaded queries with y_inline - by Lordzy - 04.12.2014, 13:02
Re: MySQL Threaded queries with y_inline - by Kaperstone - 04.12.2014, 13:26
Re: MySQL Threaded queries with y_inline - by maddinat0r - 04.12.2014, 14:48
Re: MySQL Threaded queries with y_inline - by iReacheR - 04.12.2014, 15:38
Re: MySQL Threaded queries with y_inline - by Lordzy - 04.12.2014, 15:59
Re: MySQL Threaded queries with y_inline - by Jay_ - 04.12.2014, 16:02
Re: MySQL Threaded queries with y_inline - by Jay_ - 08.12.2014, 10:44
Re: MySQL Threaded queries with y_inline - by rickisme - 08.12.2014, 19:19
Re: MySQL Threaded queries with y_inline - by maddinat0r - 09.12.2014, 14:53
Re: MySQL Threaded queries with y_inline - by rickisme - 10.12.2014, 15:06
Re: MySQL Threaded queries with y_inline - by iReacheR - 14.01.2015, 22:46
Re: MySQL Threaded queries with y_inline - by PaulDinam - 15.01.2015, 09:40
Re: MySQL Threaded queries with y_inline - by im - 15.01.2015, 12:02
Re: MySQL Threaded queries with y_inline - by maddinat0r - 17.01.2015, 13:08
Re: MySQL Threaded queries with y_inline - by andyandyy8 - 14.02.2015, 20:33
Re: MySQL Threaded queries with y_inline - by Cypress - 22.02.2015, 22:26
Re: MySQL Threaded queries with y_inline - by kurta999 - 12.01.2017, 23:11
Re: MySQL Threaded queries with y_inline - by renatog - 12.01.2017, 23:40
Re: MySQL Threaded queries with y_inline - by Yaa - 22.01.2017, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)