SA-MP Forums Archive
error 035: argument type mismatch (argument 3) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 035: argument type mismatch (argument 3) (/showthread.php?tid=448127)



error 035: argument type mismatch (argument 3) - UserIndonesia - 03.07.2013

I Put This Code In My PWN

Код:
CMD:ad(playerid, users[], params[]) {
    new giveplayerid,string[128];
	if (sscanf(params, "u", giveplayerid)) return Inter_SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /ad [text]");
	if(IsPlayerInRangeOfPoint(playerid, 3,1689.76624, -1344.26697, 17.13734)){
	GivePlayerMoney(playerid, -5000);
	format(string, sizeof(string), "[ADVERTISEMENT] %s, Contact %s ",  params, users);
	Inter_SendClientMessageToAll(COLOR_RED,string);
	GameTextForPlayer(playerid, "~w~Advertisement ~n~~w~Price:~g~$5000", 4321,1);
	}
	return 1;
}
Error:
Код:
error 035: argument type mismatch (argument 3)
Help Me To Fix This Line Thanks


Re: error 035: argument type mismatch (argument 3) - niconhan - 03.07.2013

Remove users[] on line 035
Код:
CMD:ad(playerid, params[]) {
    new giveplayerid,string[128];
	if (sscanf(params, "u", giveplayerid)) return Inter_SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /ad [text]");
	if(IsPlayerInRangeOfPoint(playerid, 3,1689.76624, -1344.26697, 17.13734)){
	GivePlayerMoney(playerid, -5000);
	format(string, sizeof(string), "[ADVERTISEMENT] %s, Contact %s ",  params, users);
	Inter_SendClientMessageToAll(COLOR_RED,string);
	GameTextForPlayer(playerid, "~w~Advertisement ~n~~w~Price:~g~$5000", 4321,1);
	}
	return 1;
}
Good luck