(2370) : error 035: argument type mismatch (argument 1) (2372) : error 035: argument type mismatch (argument 1) (2374) : error 035: argument type mismatch (argument 1) (2376) : error 035: argument type mismatch (argument 1) (237 : error 035: argument type mismatch (argument 1) (2380) : error 035: argument type mismatch (argument 1) (2382) : error 035: argument type mismatch (argument 1) (2384) : error 035: argument type mismatch (argument 1) (2386) : error 035: argument type mismatch (argument 1) (238 : error 035: argument type mismatch (argument 1) (2390) : error 035: argument type mismatch (argument 1) (2392) : error 035: argument type mismatch (argument 1) (2394) : error 035: argument type mismatch (argument 1) (2396) : error 035: argument type mismatch (argument 1) (239 : error 035: argument type mismatch (argument 1) (2400) : error 035: argument type mismatch (argument 1) |
stock LoadVehicleID(vehicleid, playerid) { new query[1021]; new fetchVal[100]; format(query, sizeof(query), "SELECT * FROM pvehicles WHERE id= %d", vehicleid); mysql_query(query); mysql_store_result(); if(mysql_num_rows()) if(mysql_fetch_row(query)) { mysql_fetch_field("id", fetchVal); vehicleinfo[vehicleid][vvid] = strval(fetchVal); mysql_fetch_field("model", fetchVal); vehicleinfo[vehicleid][Model] = strval(fetchVal); mysql_fetch_field("color1", fetchVal); vehicleinfo[vehicleid][Color1] = strval(fetchVal); mysql_fetch_field("color2", fetchVal); vehicleinfo[vehicleid][Color2] = strval(fetchVal); mysql_fetch_field("x", fetchVal); vehicleinfo[vehicleid][possx] = strval(fetchVal); mysql_fetch_field("y", fetchVal); vehicleinfo[vehicleid][possy] = strval(fetchVal); mysql_fetch_field("z", fetchVal); vehicleinfo[vehicleid][possz] = strval(fetchVal); mysql_fetch_field("a", fetchVal); vehicleinfo[vehicleid][possa] = strval(fetchVal); mysql_fetch_field("name", fetchVal); format(vehicleinfo[vehicleid][Name], 50, fetchVal); mysql_fetch_field("owner", fetchVal); format(vehicleinfo[vehicleid][Owner], 50, fetchVal); mysql_fetch_field("lock", fetchVal); vehicleinfo[vehicleid][Lock] = strval(fetchVal); mysql_fetch_field("parked", fetchVal); vehicleinfo[vehicleid][Parked] = strval(fetchVal); mysql_fetch_field("spawned", fetchVal); vehicleinfo[vehicleid][Spawned] = strval(fetchVal); mysql_fetch_field("destroyed", fetchVal); vehicleinfo[vehicleid][Destroyed] = strval(fetchVal); mysql_fetch_field("licenses", fetchVal); vehicleinfo[vehicleid][Licenses] = strval(fetchVal); mysql_fetch_field("engine", fetchVal); vehicleinfo[vehicleid][Engine] = strval(fetchVal); mysql_fetch_field("type", fetchVal); vehicleinfo[vehicleid][vtype] = strval(fetchVal); vkey[playerid] = CreateVehicle(vehicleinfo[vehicleid][Model],vehicleinfo[vehicleid][possx],vehicleinfo[vehicleid][possy],vehicleinfo[vehicleid][possz],vehicleinfo[vehicleid][possa],vehicleinfo[vehicleid][Color1],vehicleinfo[vehicleid][Color2], 60*10000); SetVehicleZAngle(vkey[playerid], vehicleinfo[vehicleid][possa]); printf("result: %d",vkey[playerid]); vvkey[vkey[playerid]] = vehicleid; new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(vkey[playerid],engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vkey[playerid],0,lights,alarm,doors,bonnet,boot,objective); vehicleinfo[vehicleid][Engine] = 0; printf("type = %d", vehicleinfo[vehicleid][vtype]); } }
CMD:vget(playerid, params[]){ new string[256]; new x_v[256]; new idx; new x_vehicles[256]; x_v = strtok(params, idx); x_vehicles = strtok(params, idx); if(!strlen(x_vehicles)) { (playerid,COLOR_YELLOW2," /vget (id) "); return true; } if(vkey[playerid] > 0) { SendClientMessage(playerid, COLOR_RED,"You can only have one vehicle spawned!"); return 1; } if(strcmp(x_vehicles,"1",true) == 0) { if(playerkeys[playerid][0] == 0) { SendClientMessage(playerid, COLOR_RED,"You don't have any vehicle on this slot!"); return 1; } LoadVehicleID(playerkeys[playerid][0], playerid); } if(strcmp(x_vehicles,"2",true) == 0) { if(playerkeys[playerid][1] == 0) { SendClientMessage(playerid, COLOR_RED,"You don't have any vehicle on this slot!"); return 1; } LoadVehicleID(playerkeys[playerid][1], playerid); } if(strcmp(x_vehicles,"3",true) == 0) { if(playerkeys[playerid][2] == 0) { SendClientMessage(playerid, COLOR_RED,"You don't have any vehicle on this slot!"); return 1; } LoadVehicleID(playerkeys[playerid][2], playerid); } if(strcmp(x_vehicles,"4",true) == 0) { if(playerkeys[playerid][3] == 0) { SendClientMessage(playerid, COLOR_RED,"You don't have any vehicle on this slot!"); return 1; } LoadVehicleID(playerkeys[playerid][3], playerid); } if(strcmp(x_vehicles,"5",true) == 0) { if(playerkeys[playerid][4] == 0) { SendClientMessage(playerid, COLOR_RED,"You don't have any vehicle on this slot!"); return 1; } LoadVehicleID(playerkeys[playerid][4], playerid); } return 1; }
//Bad
mysql_fetch_field("wafflez", str);
//Good
mysql_fetch_field(0, str);
mysql_fetch_field("WAFFLEZ", fetchVal);
//changes to
mysql_get_field("WAFFLEZ", fetchVal);
mysql_fetch_field uses field index, not name.
pawn Код:
pawn Код:
|