Error in code
#1

I am having this error: warning 202: number of arguments does not match definition



if(!strcmp(cmdtext, "/asellcar", true))
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SCM(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new vehid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
new Float: x,Float:y,Float:z;
new Float:a;
CarInfo[vehid][cOwned] = 0;
strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~You have admin sold the vehicle", 10000, 3);
GetVehiclePos(vehid, x, y, z);
GetVehicleZAngle(vehid, a);
CarInfo[vehid][cLocationx] = x;
CarInfo[vehid][cLocationy] = y;
CarInfo[vehid][cLocationz] = z;
CarInfo[vehid][cAngle] = a;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
OnPropUpdate();
DestroyVehicle(vehid);
CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],60000);
format(string, sizeof(string), "[AdmWarning]: %s a folosit comanda /asellcar.",playername);
ABroadCast(COLOR_LIGHTRED,string, 5);
return 1;
}
else
{
SCM(playerid, COLOR_GREY, " You are not authorized to use that command !");
return 1;
}
}
return 1;
}
Reply
#2

You could've posted the line that gave the warning atleast instead of letting the users keep looking your code to find the line...

Change:
pawn Код:
CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],60000);
to:
pawn Код:
CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],-1, -1, 60000);
You forgot 2 parameters: color1 and color2
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)