SQL Error
#3

Cars dont spawn at all now.

pawn Код:
public LoadCar()
{
    new file[26], query[256];
    for(new idx = 1; idx < sizeof(CarInfo) ; idx++)
    {
        format(file, sizeof(file),"SELECT * from `ownedcars` WHERE `id`=%d LIMIT 1;", idx)
        mysql_query(file);
        mysql_store_result();
        CarInfo[idx][cModel] = mysql_fetch_field_row("Model", file);
        CarInfo[idx][cLocationx] = mysql_get_field("Location_X", file);
        CarInfo[idx][cLocationy] = mysql_get_field("Location_Y", file);
        CarInfo[idx][cLocationz] = mysql_get_field("Location_Z", file);
        CarInfo[idx][cAngle] = mysql_get_field("Angle", file);
        CarInfo[idx][cColorOne] = mysql_get_field("Color_1", file);
        CarInfo[idx][cColorTwo] = mysql_get_field("Color_2", file);
        CarInfo[idx][cOwner] = mysql_get_field("Owner", file);
        CarInfo[idx][cOwned] = mysql_get_field("Owned", file);
        CarInfo[idx][cLock] = mysql_get_field("Locked", file);
        CarInfo[idx][cPaintjob] = mysql_get_field("Paintjob", file);
        CarInfo[idx][cVirWorld] = mysql_get_field("VirtualWorld", file);
        CarInfo[idx][cComponent0] = mysql_get_field("Component0", file);
        CarInfo[idx][cComponent1] = mysql_get_field("Component1", file);
        CarInfo[idx][cComponent2] = mysql_get_field("Component2", file);
        CarInfo[idx][cComponent3] = mysql_get_field("Component3", file);
        CarInfo[idx][cComponent4] = mysql_get_field("Component4", file);
        CarInfo[idx][cComponent5] = mysql_get_field("Component5", file);
        CarInfo[idx][cComponent6] = mysql_get_field("Component6", file);
        CarInfo[idx][cComponent7] = mysql_get_field("Component7", file);
        CarInfo[idx][cComponent8] = mysql_get_field("Component8", file);
        CarInfo[idx][cComponent9] = mysql_get_field("Component9", file);
        CarInfo[idx][cComponent10] = mysql_get_field("Component10", file);
        CarInfo[idx][cComponent11] = mysql_get_field("Component11", file);
        CarInfo[idx][cComponent12] = mysql_get_field("Component12", file);
        CarInfo[idx][cComponent13] = mysql_get_field("Component13", file);
        CarInfo[idx][cCode] = mysql_get_field("SecurityCode", file);
    }
    print("[MYSQL]: Loaded Cars From Database");
    return 1;
}
That's the code I'm currently working with, if any help?
Reply


Messages In This Thread
SQL Error - by UnknownGamer - 24.05.2013, 01:14
Re: SQL Error - by Hernando - 24.05.2013, 01:29
Re: SQL Error - by UnknownGamer - 24.05.2013, 01:34
Re: SQL Error - by Hernando - 24.05.2013, 01:46
Re: SQL Error - by UnknownGamer - 24.05.2013, 01:54
Re: SQL Error - by Vince - 24.05.2013, 07:41
Re: SQL Error - by UnknownGamer - 24.05.2013, 11:11
Re: SQL Error - by UnknownGamer - 24.05.2013, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)