function Vehicle_Load()
{
new rows = cache_get_row_count(VDatabase); //<-- warning 213: tag mismatch
if(rows != 0)
{
forex(row,rows)
{
new vehicleid = cache_get_value_int(row, 0, VDatabase); //<-- warning 213: tag mismatch
new ORM:ormid = ServerVehicle[vehicleid][ORM_ID] = orm_create("server_vehicles");
case 2:
{
if(IsNull(string)) return SEM(playerid,"<USAGE>: /vehicle delete [vehicleid]");
new vehicleid = strval(string);
if(Iter_Contains(Vehicles,vehicleid))
{
format(string,sizeof(string),"<VEHICLEINFO>: {ffffff}(Server) Vehicle with {ffff00}id %d {ffffff}has been deleted!",vehicleid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
DestroyVehicle(VehicleID[vehicleid]);
orm_delete(ServerVehicle[vehicleid][ORM_ID],true); //<-- error 035: argument type mismatch (argument 2)
Iter_Remove(Vehicles,vehicleid);
}
else SEM(playerid,"<ERROR>: Invalid vehicleid !");
}
function Vehicle_Load()
{
new rows = cache_get_row_count(VDatabase); //<-- warning 213: tag mismatch
if(rows != 0)
{
forex(row,rows)
{
new vehicleid = cache_get_value_int(rows, VDatabase); //<-- warning 213: tag mismatch
new ORM:ormid = ServerVehicle[vehicleid][ORM_ID] = orm_create("server_vehicles");
case 2:
{
if(IsNull(string)) return SEM(playerid,"<USAGE>: /vehicle delete [vehicleid]");
new vehicleid = strval(string);
if(Iter_Contains(Vehicles,vehicleid))
{
format(string,sizeof(string),"<VEHICLEINFO>: {ffffff}(Server) Vehicle with {ffff00}id %d {ffffff}has been deleted!",vehicleid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
DestroyVehicle(VehicleID[vehicleid]);
orm_delete(ServerVehicle[vehicleid][ORM_ID]); //<-- error 035: argument type mismatch (argument 2)
Iter_Remove(Vehicles,vehicleid);
}
else SEM(playerid,"<ERROR>: Invalid vehicleid !");
}
|
https://sampwiki.blast.hk/wiki/MySQL#cache_get_row_count
The destination variable to store and not the connection handle or use cache_num_rows() https://sampwiki.blast.hk/wiki/MySQL#cac...alue_index_int Functions does not longer return the integer value but it is passed by reference. For more details: https://sampforum.blast.hk/showthread.php?tid=616103 https://sampwiki.blast.hk/wiki/MySQL#orm_delete Remove 2nd parameter completely. |
orm_delete(ORM:id, const callback[] = "", const format[] = "", {Float, _}:...)
orm_delete(ServerVehicle[vehicleid][ORM_ID],true);
orm_delete(ServerVehicle[vehicleid][ORM_ID]);
new mySql:VDatabase; VDatabase = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE_WORLD, option_id); <--mismatch. mysql_pquery(VDatabase,"SELECT * FROM `server_vehicles` ORDER BY `veh_id` ASC","Vehicle_Load",""); <-- mismatch.