Cache_get_row does not get anything!
#1

Hello so i have this:
pawn Код:
forward OnPlayerHousesVehiclesLoad(playerid, houseid_);
public OnPlayerHousesVehiclesLoad(playerid, houseid_)
{
    printf( "OnPlayerHousesVehiclesLoad::houseid_ = %d", houseid_ );
    new rows, fields;
    cache_get_data( rows, fields, Handle );

    if( rows )
    {
        print("There are rows - Vehicles");
        new
        idx = 0,
        cmodel2, Float: cx2, Float: cy2, Float: cz2, Float: crot2, ccol1, ccol2, _carid
        ;
        while( rows > idx )
        {
            _carid = cache_get_row_int(idx, 2);
            cmodel2 = cache_get_row_int( idx, 3 );
            cx2 = cache_get_row_float( idx, 4 );
            cy2 = cache_get_row_float( idx, 5 );
            cz2 = cache_get_row_float( idx, 6 );
            crot2 = cache_get_row_float( idx, 7 );
            ccol1 = cache_get_row_int( idx, 8 );
            ccol2 = cache_get_row_int( idx, 9 );

            printf("House_AddVehicle(%d,%d,%f,%f,%f,%f,%d,%d, %d);", houseid_, cmodel2, cx2, cy2, cz2, crot2, ccol1, ccol2, _carid);
            House_AddVehicle(houseid_, cmodel2, cx2, cy2, cz2, crot2, ccol1, ccol2, _carid);
            print("Car loaded");

            idx++;
        }
    }
    return 1;
}
Now this line doesnt work:
Код:
		_carid = cache_get_row_int(idx, 2);
But the problem is _Carid is always zero while theres a 0 and a 1 in the database:


Uploaded with ImageShack.us
Reply


Messages In This Thread
Cache_get_row does not get anything! - by thimo - 17.07.2013, 10:31
Re: Cache_get_row does not get anything! - by Misiur - 17.07.2013, 10:36
Re: Cache_get_row does not get anything! - by thimo - 17.07.2013, 10:44
Re: Cache_get_row does not get anything! - by Misiur - 17.07.2013, 10:54
Re: Cache_get_row does not get anything! - by thimo - 17.07.2013, 11:05

Forum Jump:


Users browsing this thread: 1 Guest(s)