warning 202: number of arguments does not match definition
}
COMMAND:veh(playerid, params[])
{
new iVehicle, iColors[2], Float:Poz[4];
if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1]))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [model ID] [color 1] [color 2]");
if(!(400 <= iVehicle <= 611))
return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Invalid model specified (model IDs start at 400, and end at 611).");
if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255))
return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Invalid colour specified (IDs start at 0, and end at 255).");
if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate.");
if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin.");
if(GetPVarInt(playerid, "Admin") < 2)
{
GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]); //getting player pos
GetPlayerFacingAngle(playerid, Poz[3]); //getting player angle
CreateVehicle(strval(params), Poz[0]+4, Poz[1], Poz[2], Poz[3], 0, 0, -1); //creating vehicle
PutPlayerInVehicle(playerid, 0); //Puting player in vehicle as dirver
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You do not have access to this command!");
}
return 1;
I'm puzzled as to why you use strval(params), which includes the entire parameter string by the way, instead of the iVehicle you retrieved earlier.
Is that warning even from this piece of code? |
PutPlayerInVehicle(playerid, 0);
I'm puzzled as to why you use strval(params), which includes the entire parameter string by the way, instead of the iVehicle you retrieved earlier.
Is that warning even from this piece of code? Edit: and I'm not paying attention because apparently it is. |