mysql command out of sync
#3

pawn Код:
stock initiateCars()
{
    for(new id = 1; id < sizeof(CarInfo); id++)
    {
        format(Query, sizeof(Query), "SELECT * FROM `cars` WHERE `id` = %d", id);
        mysql_query(Query);
        mysql_store_result();
        if(!mysql_num_rows()) continue;
        if(mysql_fetch_row_format(Query, "|"))
        {
            sscanf(Query, "p<|>e<is[24]ffffffffiis[24]s[24]is[32]s[32]iiiiiiiiiiiiiiiiiiiii>", CarInfo[id]);
            CreateVehicle(CarInfo[id][cModel], CarInfo[id][cLocationx], CarInfo[id][cLocationy], CarInfo[id][cLocationz]+1.0, CarInfo[id][cAngle], CarInfo[id][cColorOne], CarInfo[id][cColorTwo], 600000);
            gCarLock[id] = 1;
            SetVehicleNumberPlate(id, CarInfo[id][cLicense]);
            LoadComponents(id);
        }
    }
    mysql_free_result();
    return 1;
}
here's it

Okay, fixed it, it was because I was using onqueryfinish(not sure why) but the cars won't spawn, why?
Reply


Messages In This Thread
loading cars problem - by fordawinzz - 12.01.2012, 10:12
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:22
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:31
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:39
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:43
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 10:52
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 10:59
Re: mysql command out of sync - by [HiC]TheKiller - 12.01.2012, 11:04
Re: mysql command out of sync - by fordawinzz - 12.01.2012, 11:07
loading cars problem - by fordawinzz - 12.01.2012, 17:47

Forum Jump:


Users browsing this thread: 4 Guest(s)