vehicles not loading
#1

Hi,
my vehicles aren't loading (mysql db - Strickenkid's plugin). The mysql connection is fine, and everything works, except of the vehicles which are simply not loading (there are 19 vehicles in the database).

Here is my code:
(OnGameModeInit)
pawn Код:
new string[100];
    format(string, sizeof(string), "SELECT * FROM `vehicles`");
    mysql_query(string);
    mysql_store_result();
    new tmp[500], vcount = 0;
    while(mysql_fetch_row(tmp, "|"))
    {
        vcount++;
        if(!sscanf(tmp, "p<|>e<iiffffiiiiis[12]s[25]iiis[20]>", VehicleInfo[vcount]))
        {
            CreateVehicle(VehicleInfo[vcount][vmodel], VehicleInfo[vcount][vx], VehicleInfo[vcount][vy], VehicleInfo[vcount][vz], VehicleInfo[vcount][va], VehicleInfo[vcount][vc1], VehicleInfo[vcount][vc2], VehicleInfo[vcount][vresp]);
        }
        else
        {
            printf("invalid row format on %d", vcount);
            vcount--;
        }
    }
    mysql_free_result();
and my VehicleInfo variable
pawn Код:
enum VInfo
{
    vid,
    vmodel,
    Float:vx,
    Float:vy,
    Float:vz,
    Float:va,
    vc1,
    vc2,
    vint,
    vworld,
    vresp,
    vplate[12],
    vowner[25],
    vspec1,
    vspec2,
    vrestriction,
    vmods[20]
}
new VehicleInfo[MAX_VEHICLES][VInfo];
it always returns the "invalid row format" line...
and this is my table's structur:


so I might just have made a stupid mistake, but I just can't see it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)