02.07.2016, 18:20
(
Последний раз редактировалось DarkSkull; 02.07.2016 в 18:37.
Причина: Removed Line
)
Hi. I've been working on a Vehicle system. I'm currently working on the Saving and Loading of Vehicles.
I'm getting this Error:
This is the Code:
CreateVehicleEx Function:
I'm still testing the Loading and Saving. So I need this command to proceed.
Any help would be really great. Thanks.
I'm getting this Error:
Код:
Line 347: error 035: argument type mismatch (argument 9)
Код:
YCMD:createvehicle(playerid, params[], help) { if(help) return SendClientMessage(playerid, -1, "Allows to create a dynamic vehicle."); new vehModel, vehColor1, vehColor2, vehRespawnTime; if(sscanf(params, "iiii", vehModel, vehColor1, vehColor2, vehRespawnTime)) return SendClientMessage(playerid, -1, "USAGE: /createvehicle [Vehicle Model] [Color 1] [Color 2] [Respawn Time]"); new Float:x, Float:y, Float:z, Float:angle; new strPlayerName[MAX_PLAYER_NAME]; new vehicleid; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); GetPlayerName(playerid, strPlayerName, MAX_PLAYER_NAME); vehicleid = CreateVehicleEx(vehModel, x, y, z, angle, vehColor1, vehColor2, vehRespawnTime, strPlayerName, 160000, true); //line 347. Argument 9 is the strPlayerName(Owner name in the original function) PutPlayerInVehicle(playerid, vehicleid, 0); return 1; }
Код:
stock CreateVehicleEx(vehicleModel, Float:vxSpawn, Float:vySpawn, Float:vzSpawn, Float:vangleSpawn, vehicleColor1, vehicleColor2, vehicleRespawn, vehicleOwner, vehiclePrice, bool:vehicleBuyable) { new vehicleid = GetFreeVehicleSlot(); VehicleInfo[vehicleid][vModel] = vehicleModel; VehicleInfo[vehicleid][xSpawn] = vxSpawn; VehicleInfo[vehicleid][ySpawn] = vySpawn; VehicleInfo[vehicleid][zSpawn] = vzSpawn; VehicleInfo[vehicleid][angleSpawn] = vangleSpawn; VehicleInfo[vehicleid][vCol1] = vehicleColor1; VehicleInfo[vehicleid][vCol2] = vehicleColor2; VehicleInfo[vehicleid][vRespawn] = vehicleRespawn, VehicleInfo[vehicleid][vOwner] = vehicleOwner; VehicleInfo[vehicleid][vPrice] = vehiclePrice; VehicleInfo[vehicleid][vBuyable] = vehicleBuyable; VehicleInfo[vehicleid][vID] = CreateVehicle(vehicleModel, vxSpawn, vySpawn, vzSpawn, vangleSpawn, vehicleColor1, vehicleColor2, vehicleRespawn); vCreated[vehicleid] = true; return vehicleid; }
Any help would be really great. Thanks.