15.06.2017, 23:27
Hey guys, i am trying to create a simple server vehicle system that loads from a mysql database, however i have some minor issues.
But i basically get 2x tag mismatch errors here.
I have created a new MySQL:VDatabase;
however im getting an error on this line "new rows = cache_get_row_count(VDatabase);"
I've seen somewhere that there has been an update and i need to alter it to new rows; and work from there.
But i also seem to have the exact same error on a different line.
"new vehicleid = cache_get_value_int(row, 0, VDatabase);"
I'm not really sure what to do in this case as i have been out of the scene for a while now.
Also have an argument type mismatch (Argument 2)
"orm_delete(ServerVehicle[vehicleid][ORM_ID],true);"
I did create an enum where this information is being stored And a function to load it.
I would really like to get some help/feedback from u guys.
I've changed from mysql 39-3 to mysql 41-2.
Code:
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");
I have created a new MySQL:VDatabase;
however im getting an error on this line "new rows = cache_get_row_count(VDatabase);"
I've seen somewhere that there has been an update and i need to alter it to new rows; and work from there.
But i also seem to have the exact same error on a different line.
"new vehicleid = cache_get_value_int(row, 0, VDatabase);"
I'm not really sure what to do in this case as i have been out of the scene for a while now.
Also have an argument type mismatch (Argument 2)
"orm_delete(ServerVehicle[vehicleid][ORM_ID],true);"
Code:
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 !"); }
I would really like to get some help/feedback from u guys.
I've changed from mysql 39-3 to mysql 41-2.