error 035: argument type mismatch (argument 1)
#1

C:\UsersDownloads\gm.pwn(12892) : error 035: argument type mismatch (argument 1)


Line: 12892:
Quote:

giveplayerid = ReturnUser(playerid, tmp);

Full Command:
Quote:

dcmd_crimes(playerid, params[])
{
#pragma unused params

if (PlayerInfo[playerid][pSpawn] == 1){

if (PlayerInfo[playerid][pTeam] == TEAM_CIVILIAN){

new string[256],Wanted[128],idx,giveplayerid,tmp[256];


tmp = strtok(params, idx);
if(!strlen(tmp))
{
//SendClientMessage(playerid, COLOR_ERROR, "USAGE: /crimes (Name/Id).");
//return 1;
giveplayerid = playerid;
}else{

if(!isNumeric(tmp))
{
giveplayerid = ReturnUser(playerid, tmp);
if(giveplayerid == INVALID_PLAYER_ID)
{
return 1;
}
}
else
{
giveplayerid = strval(tmp);
if(!IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
}
}

switch (PlayerInfo[giveplayerid][pWantedLevel])
{
case 0:format(string, sizeof(string), "Wated Level %d - Innocent Civilian",PlayerInfo[giveplayerid][pWantedLevel]);
case 1..5:format(string, sizeof(string), "~y~Wated Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
case 6..10:format(string, sizeof(string), "~r~Wated Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
}
strmid(Wanted, string, 0, strlen(string), 256);

if(PlayerCrimeListRowNo[giveplayerid] > 0)
{

TextDrawHideForPlayer(playerid, Menu_Title[playerid]);
TextDrawHideForPlayer(playerid, Menu_Stats[playerid]);
TextDrawHideForPlayer(playerid, Menu_End[playerid]);
for(new r = 0; r < MAX_TEXTDRAW_ROWS; r++)
{
TextDrawHideForPlayer(playerid, Menu_Column1[playerid][r]);
TextDrawHideForPlayer(playerid, Menu_Column2[playerid][r]);
}

ShowTextDrawMenu(playerid, TD_MENU_INFO,"~g~Crime History", PlayerCrimeListRowNo[giveplayerid] + 5, 0);
//ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
format(string, sizeof(string), "%s (%d)~n~%s",PlayerInfo[giveplayerid][pName],giveplayerid,Wanted);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
ShowTextDrawMenuItems(playerid, 1, " ", " ", " ",0);
ShowTextDrawMenuItems(playerid, 2, " ", " ", " ",0);
ShowTextDrawMenuItems(playerid, 3, " ", " ", " ",0);
//ShowTextDrawMenuItems(playerid, 3, " ", Line[0], LineEx[0],0);
ShowTextDrawMenuItems(playerid, 4, " ", PlayerCrimeList[playerid][1], " ",0);
ShowTextDrawMenuItems(playerid, 5, " ", PlayerCrimeList[playerid][2], " ",0);
ShowTextDrawMenuItems(playerid, 6, " ", PlayerCrimeList[playerid][3], " ",0);
ShowTextDrawMenuItems(playerid, 7, " ", PlayerCrimeList[playerid][4], " ",0);
ShowTextDrawMenuItems(playerid, 8, " ", PlayerCrimeList[playerid][5], " ",0);
ShowTextDrawMenuItems(playerid, 9, " ", PlayerCrimeList[playerid][6], " ",0);
ShowTextDrawMenuItems(playerid, 10, " ", PlayerCrimeList[playerid][7], " ",0);
ShowTextDrawMenuItems(playerid, 11, " ", PlayerCrimeList[playerid][8], " ",0);
ShowTextDrawMenuItems(playerid, 12, " ", PlayerCrimeList[playerid][9], " ",0);

}else{

format(string, sizeof(string), "No Crimes Committed By %s (%d).",PlayerInfo[giveplayerid][pName],giveplayerid);
SendClientMessage(playerid, COLOR_ERROR, string);

}



}else{
SendClientMessage(playerid, COLOR_ERROR, "Only Civilians Can Use This Command.");
}

}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
}

return 1;
}

I would be your thankful if you explain what is it. Actually, I left scripting but im back again so i forgot everything. Nvm it. I like to know what is it and also how to fix it. Thank you.
Reply


Messages In This Thread
error 035: argument type mismatch (argument 1) - by sscarface - 25.05.2015, 15:22
Re: error 035: argument type mismatch (argument 1) - by SoFahim - 25.05.2015, 15:36
Re: error 035: argument type mismatch (argument 1) - by Konstantinos - 25.05.2015, 15:46

Forum Jump:


Users browsing this thread: 3 Guest(s)