Problem with Loading Vehicles
#2

Sorry, but what does
pawn Код:
while(mysql_fetch_row(resultline)==1)
 ==1//I mean this
stannd for ? Sorry, just haven't seen it before. Anyways this is what I use
pawn Код:
while(mysql_fetch_row(string,"|"))
            {
                if(mysql_num_rows() == 0) continue;
or else

pawn Код:
//Top of script
#define LOAD_VEHICLES 1
//I call this on GamemOdeInit
Function: LoadVehicles()
{
    mysql_query("SELECT * FROM `Vehicles` ORDER BY `vehicleid` ASC", LOAD_VEHICLES);
}

//under OnMysqlQuery
        case LOAD_VEHICLES:
        {
            mysql_store_result();
            new data[42][128];
            while(mysql_fetch_row(string,"|"))
            {
                if(mysql_num_rows() == 0) continue;
                explode(data, string, "|");
                //printf(string);
                new Carid = CreateVehicle(strval(data[1]), floatstr(data[2]), floatstr(data[3]), floatstr(data[4]), floatstr(data[5]), strval(data[6]), strval(data[7]), -1);
                printf("Loading Vehicle Data id %i: %s", Carid, string);
                VehicleInfo[Carid][vSQLID] = strval(data[0]);
                VehicleInfo[Carid][vModel] = strval(data[1]);
//etc...
Reply


Messages In This Thread
Problem with Loading Vehicles - by Antonio [G-RP] - 01.02.2011, 03:30
Re: Problem with Loading Vehicles - by PeteShag - 01.02.2011, 04:12
Re: Problem with Loading Vehicles - by Antonio [G-RP] - 01.02.2011, 05:09

Forum Jump:


Users browsing this thread: 1 Guest(s)