MySQL not loading vehicles
#6

pawn Код:
for(new ca = 0; ca < 200; ca++)
    {
        new data[256], query[512], string[256];
        new aux[50][12];
        format(query, sizeof(query), "SELECT * FROM `vehicles` WHERE CarID = %d",ca);
        mysql_query(query);
        mysql_store_result();
        printf("step1");
        mysql_retrieve_row(); // Changed line
        //if(mysql_num_rows() > 0)
        //{
            //if(strmatch(VehicleSystem[h][Owner],"Unbought")) return 1;
            Globalcarid++;
            mysql_fetch_row_format(data);
            splitGF(data, aux, '|');
            VehicleSystem[ca][CarID]=strval(aux[0]);
            printf("lalala");
            VehicleSystem[ca][Model]=strval(aux[1]);
            VehicleSystem[ca][Locked]=strval(aux[2]);
            VehicleSystem[ca][Carx]=floatstr(aux[3]);
            VehicleSystem[ca][Cary]=floatstr(aux[4]);
            VehicleSystem[ca][Carz]=floatstr(aux[5]);
            VehicleSystem[ca][Cara]=floatstr(aux[6]);
            VehicleSystem[ca][Color1]=strval(aux[7]);
            VehicleSystem[ca][Color2]=strval(aux[8]);
            VehicleSystem[ca][Price]=strval(aux[9]);
            VehicleSystem[ca][Sell]=strval(aux[10]);
            format(string, sizeof(string), "%s loaded", ca);
            printf(string);
            strmid(VehicleSystem[ca][Owner],aux[11],0,20,20);
            //VehicleSystem[ca][Owner] = aux[11];
            new carr = CreateVehicle(VehicleSystem[ca][Model],VehicleSystem[ca][Carx],VehicleSystem[ca][Cary],VehicleSystem[ca][Carz]+5,VehicleSystem[ca][Cara],VehicleSystem[ca][Color1],VehicleSystem[ca][Color2],600000);
            IsBuyableCar[carr]=ca;
            printf("step3");
            SaveMYSQLCarID(carr);
            printf("step4");
        //}
    }
Reply


Messages In This Thread
MySQL not loading vehicles - by CONTROLA - 08.08.2011, 06:07
Re: MySQL not loading vehicles - by Calgon - 08.08.2011, 06:10
Re: MySQL not loading vehicles - by CONTROLA - 08.08.2011, 06:14
Re: MySQL not loading vehicles - by Calgon - 08.08.2011, 06:18
Re: MySQL not loading vehicles - by CONTROLA - 08.08.2011, 06:22
Re: MySQL not loading vehicles - by Calgon - 08.08.2011, 06:23
Re: MySQL not loading vehicles - by Donya - 08.08.2011, 06:25
Re: MySQL not loading vehicles - by CONTROLA - 08.08.2011, 06:34
Re: MySQL not loading vehicles - by Donya - 08.08.2011, 06:37
Re: MySQL not loading vehicles - by CONTROLA - 08.08.2011, 06:38

Forum Jump:


Users browsing this thread: 1 Guest(s)