SA-MP Forums Archive
help system error - 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: help system error (/showthread.php?tid=503571)



help system error - Slicebook - 30.03.2014

Код HTML:
icerpg.pwn(72248) : error 035: argument type mismatch (argument 1)
Код:
	if(egyezik(cmd, "/bemutatkoz") || egyezik(cmd, "/bemutatkoz"))
	{
		new ID;
		#pragma tabsize 0
		new string[200];
		new Float:X, Float: Y, Float:Z;
		new nev[MAX_PLAYER_NAME];
		new nev2[MAX_PLAYER_NAME];
			if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Hasznбlat: /bemutatkoz ID/Nйv"); <<< ERROR !
			GetPlayerPos(playerid, X, Y, Z);
				if(!IsPlayerInRangeOfPoint(ID, 5.0, X, Y, Z)) return SendClientMessage(playerid, -1, "Nincs a megadott jбtйkos a kцzeledben!");
				SendClientMessage(playerid, -1, "Bemutatkoztбl valakinek!");
				GetPlayerName(playerid, nev, 24);
				GetPlayerName(ID, nev2, 24);
				format( string, sizeof ( string ), "Ьdv! Йn %s vagyok!", nev);
				SendClientMessage( ID, -1, string );
				ShowPlayerNameTagForPlayer(playerid, ID, true);
				ShowPlayerNameTagForPlayer(ID, playerid, true);
				return 1;
	}



Re: help system error - BroZeus - 30.03.2014

its because parmas spelling is wrong it should be "parmas" not "params"
and also it seems that you are using OnPlyerCommand text so the line should be
pawn Код:
if(sscanf(cmdtext, "u", ID))



Re: help system error - Slicebook - 30.03.2014

thanks!


Re: help system error - Stinged - 30.03.2014

Actually, that wouldn't fix the problem.
You are using cmdtext, so you need to count the length of the command, then replace cmdtext at sccanf with cmdtext[number]. Replace that number with the length + 1