MySQL Help [Cache_get_row_int
#1

Hello Sa:mp forums
I've discoverd a critical error in my script this makes it unable to save the player owned vehicles (I think?)
I've kniow Idea what I've to do to fix this I tried to change the INT numbers in the database but that didn't help
please help me

PHP код:
[19:45:14] [ERRORcache_get_row_int invalid datatype
[19:45:14] [ERRORcache_get_row_int invalid datatype
[19:45:14] [ERRORcache_get_row_int invalid datatype
[19:45:14] [ERRORcache_get_row_int invalid datatype
[19:45:35] [ERRORmysql_tquery callback parameter count does not match format specifier length 
Reply
#2

Any help?
Reply
#3

Without code we can merely guess what's going on.
Reply
#4

This is the script where it should save the ownedvehicles but it only saves the information under: Users


PHP код:
stock OnPlayerBuyCar(playeridvehidmodelcolor1color2slotFloat:ParkXFloat:ParkYFloat:ParkZFloat:ParkAplate[], owner[])
{
    
//======================================================================================
    
format(querysizeof(query), "INSERT INTO `ownedvehicles` (model, color1, color2, parkx, parky, parkz, parka) VALUES (%d, %d, %d, %f, %f, %f, %f)",    modelcolor1color2ParkXParkYParkZParkA);
    
format(querysizeof(query), "INSERT INTO `ownedvehicles` (plate, owner, owned, slot) VALUES ('%s', '%s', %d, %d)"plateownerownedslot 1slot);
    
mysql_function_query(dbHandlequerytrue"OnOwnedVehicleInsert""%d"vehid);
    
//======================================================================================
    
format(querysizeof(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",
    
0002005010GetName(playerid), slot);
    
mysql_function_query(dbHandlequeryfalse"""");
    
//======================================================================================
    
format(querysizeof(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(dbHandlequeryfalse"""");
    
//======================================================================================
    
format(querysizeof(query), "UPDATE `ownedvehicles` SET `comp0` = %d, `comp1` = %d, `comp2` = %d, `comp3` = %d, `comp4` = %d, `comp5` = %d, `comp6` = %d WHERE `owner` = '%s' AND `slot` = %d"
    
0000000GetName(playerid), slot);
    
mysql_function_query(dbHandlequeryfalse"""");
    
//=====================================================================================
    
format(querysizeof(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"
    
00000003GetName(playerid), slot);
    
mysql_function_query(dbHandlequeryfalse"""");
    
//=====================================================================================
    
format(querysizeof(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], 0GetName(playerid), slot);
    
mysql_function_query(dbHandlequeryfalse"""");
    
//=====================================================================================
    
format(querysizeof(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(dbHandlequeryfalse"""");
    
//=====================================================================================
    
format(querysizeof(query), "UPDATE `users` SET `vehicles` = %d WHERE `name` = '%s'"PlayerInfo[playerid][pVehicles], GetName(playerid));
    
mysql_function_query(dbHandlequeryfalse"""");
    
//======================================================================================
    
if(slot == 1)
    {
        
format(querysizeof(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(dbHandlequeryfalse"""");
    }
    else if(
slot == 2)
    {
        
format(querysizeof(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(dbHandlequeryfalse"""");
    }
    else if(
slot == 3)
    {
        
format(querysizeof(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(dbHandlequeryfalse"""");
    }
    
//======================================================================================
    
return 1;

Reply
#5

pawn Код:
public OnGameModeInit()
{
    mysql_debug(1);
    // you're code.
}
And then post your error log that is located in debug.txt in your main server folder.

(( If it prints the same, change mysql_debug(1) to mysql_debug(LOG_ERROR | LOG_WARNING) ))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)