Error: Argument type Mismatch
#1

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:

Код:
Line 347: error 035: argument type mismatch (argument 9)
This is the Code:

Код:
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;
}
CreateVehicleEx Function:

Код:
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;
}
I'm still testing the Loading and Saving. So I need this command to proceed.

Any help would be really great. Thanks.
Reply


Messages In This Thread
Error: Argument type Mismatch - by DarkSkull - 02.07.2016, 18:20
Re: Error: Argument type Mismatch - by Dayrion - 02.07.2016, 18:28
Re: Error: Argument type Mismatch - by Arturo226 - 02.07.2016, 18:29
Re: Error: Argument type Mismatch - by DarkSkull - 02.07.2016, 18:35
Re: Error: Argument type Mismatch - by Unrea1 - 02.07.2016, 18:40
Re: Error: Argument type Mismatch - by DarkSkull - 02.07.2016, 18:43
Re: Error: Argument type Mismatch - by Dayrion - 02.07.2016, 19:09
Re: Error: Argument type Mismatch - by DarkSkull - 02.07.2016, 19:14
Re: Error: Argument type Mismatch - by Konstantinos - 02.07.2016, 19:40
Re: Error: Argument type Mismatch - by DarkSkull - 02.07.2016, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)