Mysql help
#9

I found a way to fix it. Now got another problem. In mysql log file i see "invalid connection handle" referred to this:

pawn Код:
mysql_tquery(g_SQL, "SELECT * FROM `vendors`", "Vendor_Load", "");
(OnGameModeInit to load vending machines)

Vendor_Load (after my fix):

pawn Код:
public Vendor_Load()
{
    static rows, fields;

    for (new i = 0; i < rows; i ++) if (i < MAX_VENDORS)
    {
    if(cache_num_rows() > 0)
    {
        VendorData[i][vendorExists] = true;
        VendorData[i][vendorID] = cache_get_value_int(i,"vendorID",VendorData[i][vendorID]);
        VendorData[i][vendorType] = cache_get_value_int(i,"vendorType",VendorData[i][vendorType]);
        VendorData[i][vendorPos][0] = cache_get_value_float(i, "vendorX",VendorData[i][vendorPos][0]);
        VendorData[i][vendorPos][1] = cache_get_value_float(i, "vendorY",VendorData[i][vendorPos][1]);
        VendorData[i][vendorPos][2] = cache_get_value_float(i, "vendorZ",VendorData[i][vendorPos][2]);
        VendorData[i][vendorPos][3] = cache_get_value_float(i, "vendorA",VendorData[i][vendorPos][3]);
        VendorData[i][vendorInterior] = cache_get_value_int(i,"vendorInterior",VendorData[i][vendorInterior]);
        VendorData[i][vendorWorld] = cache_get_value_int(i,"vendorWorld",VendorData[i][vendorWorld]);

        Vendor_Refresh(i);
    }
    }
    return 1;
}
Already checked, vending machines are created perfectly in mysql table. What's the problem?
Reply


Messages In This Thread
Mysql help - by KinderClans - 13.08.2018, 14:29
Re: Mysql help - by TVDude - 13.08.2018, 14:42
Re: Mysql help - by KinderClans - 13.08.2018, 14:43
Re: Mysql help - by TVDude - 13.08.2018, 14:45
Re: Mysql help - by KinderClans - 13.08.2018, 14:46
Re: Mysql help - by TVDude - 13.08.2018, 14:56
Re: Mysql help - by KinderClans - 13.08.2018, 15:07
Re: Mysql help - by TVDude - 13.08.2018, 15:15
Re: Mysql help - by KinderClans - 13.08.2018, 19:20
Re: Mysql help - by Florin48 - 13.08.2018, 20:27
Re: Mysql help - by KinderClans - 13.08.2018, 20:40
Re: Mysql help - by travistaylor - 13.08.2018, 20:46
Re: Mysql help - by KinderClans - 13.08.2018, 20:49
Re: Mysql help - by KinderClans - 13.08.2018, 20:55
Re: Mysql help - by denNorske - 14.08.2018, 18:05
Re: Mysql help - by TVDude - 14.08.2018, 18:14
Re: Mysql help - by KinderClans - 14.08.2018, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)