mysql_tquery - callback parameter count does not match format specifier length |
stock OnOwnedVehicleInsert(vehid) { VehicleInfo[vehid][carID] = cache_insert_id(); return 1; } stock OnPlayerBuyCar(playerid, vehid, model, color1, color2, slot, Float:ParkX, Float:ParkY, Float:ParkZ, Float:ParkA, plate[], owner[]) { //====================================================================================== format(query, sizeof(query), "INSERT INTO `ownedvehicles` (model, color1, color2, parkx, parky, parkz, parka, plate, owner, owned, slot) VALUES (%d, %d, %d, %f, %f, %f, %f, '%s', '%s', %d, %d)", model, color1, color2, ParkX, ParkY, ParkZ, ParkA, plate, owner, 1, slot); mysql_function_query(dbHandle, query, true, "OnOwnedVehicleInsert", "%d", vehid); //====================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `alarm` = %d, `lock` = %d, `immob` = %d, `insurances` = %d, `destroys` = %d, `gps` = %d, `fuel` = %d, `registered` = %d, `broken` = %d WHERE `owner` = '%s' AND `slot` = %d", 0, 0, 0, 2, 0, 0, 50, 1, 0, GetName(playerid), slot); mysql_function_query(dbHandle, query, false, "", ""); //====================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `weapons` = '%s' WHERE `owner` = '%s' AND `slot` = %d", "0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0", GetName(playerid),slot); mysql_function_query(dbHandle, query, false, "", ""); //====================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `comp0` = %d, `comp1` = %d, `comp2` = %d, `comp3` = %d, `comp4` = %d, `comp5` = %d, `comp6` = %d WHERE `owner` = '%s' AND `slot` = %d", 0, 0, 0, 0, 0, 0, 0, GetName(playerid), slot); mysql_function_query(dbHandle, query, false, "", ""); //===================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `comp7` = %d, `comp8` = %d, `comp9` = %d, `comp10` = %d, `comp11` = %d, `comp12` = %d, `comp13` = %d, `paintjob` = %d WHERE `owner` = '%s' AND `slot` = %d", 0, 0, 0, 0, 0, 0, 0, 3, GetName(playerid), slot); mysql_function_query(dbHandle, query, false, "", ""); //===================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `radio` = %d, `tickets` = '%s', `dupkey` = %d, `comps` = %d WHERE `owner` = '%s' AND `slot` = %d", 0, "0|0|0|0|0|0|0|0|0|0", VehicleInfo[vehid][carDupKey], 0, GetName(playerid), slot); mysql_function_query(dbHandle, query, false, "", ""); //===================================================================================== format(query, sizeof(query), "UPDATE `ownedvehicles` SET `drugs` = '%s' WHERE `owner` = '%s' AND `slot` = %d", "0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0|0=0", GetName(playerid), slot); mysql_function_query(dbHandle, query, false, "", ""); //===================================================================================== format(query, sizeof(query), "UPDATE `users` SET `vehicles` = %d WHERE `name` = '%s'", PlayerInfo[playerid][pVehicles], GetName(playerid)); mysql_function_query(dbHandle, query, false, "", ""); //====================================================================================== if(slot == 1) { format(query, sizeof(query), "UPDATE `users` SET `veh1` = '%s' WHERE `name` = '%s'", VehicleNames[model-400], GetName(playerid)); format(PlayerVehicle[playerid][pVeh1], 128, "%s", VehicleNames[model-400]); mysql_function_query(dbHandle, query, false, "", ""); } else if(slot == 2) { format(query, sizeof(query), "UPDATE `users` SET `veh2` = '%s' WHERE `name` = '%s'", VehicleNames[model-400], GetName(playerid)); format(PlayerVehicle[playerid][pVeh2], 128, "%s", VehicleNames[model-400]); mysql_function_query(dbHandle, query, false, "", ""); } else if(slot == 3) { format(query, sizeof(query), "UPDATE `users` SET `veh3` = '%s' WHERE `name` = '%s'", VehicleNames[model-400], GetName(playerid)); format(PlayerVehicle[playerid][pVeh3], 128, "%s", VehicleNames[model-400]); mysql_function_query(dbHandle, query, false, "", ""); } //====================================================================================== return 1; } stock UpdateVehicleStatus(playerid, vehicle) { new slot = PlayerInfo[playerid][pVehSlot]; VehicleStatus[playerid][slot][carAlarm] = VehicleInfo[vehicle][carAlarm]; VehicleStatus[playerid][slot][carLock] = VehicleInfo[vehicle][carLock]; VehicleStatus[playerid][slot][carImmob] = VehicleInfo[vehicle][carImmob]; VehicleStatus[playerid][slot][carInsurances] = VehicleInfo[vehicle][carInsurances]; VehicleStatus[playerid][slot][carDestroyed] = VehicleInfo[vehicle][carDestroyed]; VehicleStatus[playerid][slot][carGps] = VehicleInfo[vehicle][carGps]; return 1; }
mysql_function_query(dbHandle, query, true, "OnOwnedVehicleInsert", "%d", vehid);
mysql_function_query(dbHandle, query, true, "OnOwnedVehicleInsert", "d", vehid);
stock OnPlayerBuyFurniture(houseid, interior, world, furnitureslot, model, price, name[], Float:x, Float:y, Float:z) { format(query, sizeof(query), "INSERT INTO `furnitures` (model, name, houseid, interior, virworld, marketprice, posx, posy, posz) VALUES (%d, '%s', %d, %d, %d, %d, %f, %f, %f)", model, name, HouseInfo[houseid][hID], interior, world, price, x, y ,z); mysql_function_query(dbHandle, query, true, "OnFurnitureInsert", "iiiiiis[128]fff", houseid, interior, world, furnitureslot, model, price, name, x, y, z); return 1; } stock OnPlayerEditedFurniture(playerid, furnitureslot, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) { format(query, sizeof(query), "UPDATE `furnitures` SET `posx` = %f, `posy` = %f, `posz` = %f, `posrx` = %f, `posry` = %f, `posrz` = %f WHERE `id` = %d", x, y, z, rx, ry, rz, FurnitureInfo[PlayerInfo[playerid][pHouseKey]][furnitureslot][fID]); mysql_function_query(dbHandle, query, true, "OnFurnitureUpdatePos", "iiffffff", playerid, furnitureslot, x, y, z, rx, ry, rz); return 1; } stock OnPlayerSellFurniture(playerid, houseid, furnitureslot) { format(query, sizeof(query), "DELETE FROM `furnitures` WHERE `id` = %d", FurnitureInfo[houseid][furnitureslot][fID]); mysql_function_query(dbHandle, query, true, "OnPlayerSoldFurniture", "idd", playerid, houseid, furnitureslot); return 1; }
mysql_function_query(dbHandle, query, true, "OnFurnitureInsert", "iiiiiis[128]fff", houseid, interior, world, furnitureslot, model, price, name, x, y, z);
mysql_function_query(dbHandle, query, true, "OnFurnitureInsert", "iiiiiisfff", houseid, interior, world, furnitureslot, model, price, name, x, y, z);