PHP код:
stock LoadVehicle(playerid)
{
//new carData [ 6 ] , Float:posi [ 4 ] , Float:hp;
new tr = playerCar1 [ playerid ];
//new const Result:r = sql_query(sql, f("SELECT * FROM "MySQL_VEHICLES_TABLE" WHERE savininkas = '%s'", getPlayerName(playerid)), QUERY_CACHED);
//new const Result:r = sql_query(sql, f("SELECT * FROM "MySQL_VEHICLE_TABLE" WHERE savininkas = '%s'"), getPlayerName(playerid), QUERY_CACHED); // 312
new const Result:r = sql_query(sql,
f("SELECT * FROM "MySQL_VEHICLE_TABLE" WHERE savininkas = '%s'", getPlayerName(playerid)),
QUERY_CACHED // cached naudoti kai imi duomenis iљ mysql
);
sql_get_field_assoc(r, "savininkas", masina[ tr ][vehOwner], MAX_PLAYER_NAME); // 314
masina[ tr ][ vehModel ] = sql_get_field_assoc_int(r, "modelis");
masina[ tr ][ lock ] = (sql_get_field_assoc_int(r, "uzraktas"))?(true):(false);
masina[ tr ][ Gas ] = sql_get_field_assoc_float(r, "degalai");
masina[ tr ][ vehColor ][0] = sql_get_field_assoc_int(r, "spalva1");
masina[ tr ][ vehColor ][1] = sql_get_field_assoc_int(r, "spalva2");
masina[ tr ][ vehLastPos ][ 0 ] = sql_get_field_assoc_float(r, "posX");
masina[ tr ][ vehLastPos ][ 1 ] = sql_get_field_assoc_float(r, "posY");
masina[ tr ][ vehLastPos ][ 2 ] = sql_get_field_assoc_float(r, "posZ");
masina[ tr ][ vehLastPos ][ 3 ] = sql_get_field_assoc_float(r, "posA");
playerCar1 [ playerid ] = CreateVehicle ( masina[ tr ][ vehModel ] , masina[ tr ][ vehLastPos ][ 0 ] , masina[ tr ][ vehLastPos ][ 1 ] , masina[ tr ][ vehLastPos ][ 2 ] , masina[ tr ][ vehLastPos ][ 3 ] , masina[ tr ][ vehColor ][0] , masina[ tr ][ vehColor ][1] , -1 ) ;
masina[ tr ][ vehKaina ] = sql_get_field_assoc_int(r, "kaina");
masina[ tr ][ status ] = (sql_get_field_assoc_int(r, "statusas"))?(true):(false);
masina[ tr ][ vehVariklis ] = sql_get_field_assoc_int(r, "variklis");
masina[ tr ][ vehHealth ] = sql_get_field_assoc_float(r, "bukle");
sql_get_field_assoc(r, "numeriai", masina[ tr ][vehNumber], 21);
masina[ tr ][ vehRida ] = sql_get_field_assoc_float(r, "rida");
masina[ tr ][ vehPaintjob ] = sql_get_field_assoc_int(r, "paintjob");
masina[ tr ][ vehTech ] = sql_get_field_assoc_int(r, "technikine");
masina[ tr ][ vehTechtime ] = sql_get_field_assoc_int(r, "techlaikas");
SetVehicleParamsEx ( playerCar1 [ playerid ], masina[ tr ][ vehVariklis ], false, false, false, false, false, false ) ;
SetVehicleHealth(playerCar1 [ playerid ], masina[ tr ][ vehHealth ]);
return 1;
}
ERRORS IN LOG, when I try to load it.