SA-MP Forums Archive
Gun Store - 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: Gun Store (/showthread.php?tid=432720)



Gun Store - Jay_Dixon - 23.04.2013

Well, i'm completely lost on this, i really don't see the warning here, and i've looked over it numerous times. But i AM known to miss the smallest things, so who knows, here's the warning

(32886) : warning 202: number of arguments does not match definition

the if(IsPlayerInRangeOfPoint, is the line that's giving off the warning


Код:
CMD:guns(playerid, params[])
{
	if(PlayerInfo[playerid][pGunLic] == 1)
	{
		if(IsPlayerInRangeOfPoint(playerid, 295.8104,-38.5144,1001.5156))
		{
		    ShowPlayerDialog(playerid, 311, DIALOG_STYLE_LIST,"{00BFFF}Amunation", "9mm  $650","Submit","Cancel");
		    return 1;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED,"    You do not have a Gun License!");
		    return 1;
		}
	}
	return 1;
}



Re: Gun Store - vvhy - 23.04.2013

You forgot to include Float:range which is The furthest distance the player can be to be in range.
so it would be
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,1.0, 295.8104,-38.5144,1001.5156))//furthest distance being 1.0



Re: Gun Store - Jay_Dixon - 23.04.2013

Quote:
Originally Posted by vvhy
Посмотреть сообщение
You forgot to include Float:range which is The furthest distance the player can be to be in range.
so it would be
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,1.0, 295.8104,-38.5144,1001.5156))//furthest distance being 1.0
Thanks, fixed the problem. For some reason i never tend to see the smallest errors xD