SA-MP Forums Archive
warning 202: number of arguments does not match definition - 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: warning 202: number of arguments does not match definition (/showthread.php?tid=581762)



warning 202: number of arguments does not match definition - AnoTek - 15.07.2015

Command:

Код:
CMD:deposit(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid,50.0,2316.2244,-12.8453,26.7422))
	{
		new money,string[128];
		if(sscanf(params,"d",money)) return SendClientMessage(playerid,COLOR_WHITE,"{B8DBFF}Syntax: /deposit [amount]");
		if(GetPlayerName(playerid) < money)return SendClientMessage(playerid,COLOR_WHITE,"SERVER:You don't have enough money to put in bank!");
		new money1 = money;
		PlayerInfo[playerid][pBankmoney] += money;
		format(string,sizeof(string),"You have deposited $%d into your account!Your new balance is $%d.",money1,PlayerInfo[playerid][pBankmoney]);
		SendClientMessage(playerid,COLOR_WHITE,string);
		GivePlayerMoney(playerid,-money);
		return 1;
	}
	else 
	{
		SendClientMessage(playerid,COLOR_WHITE,"You have to be inside the bank to deposit money!");
	}
	return 1; 
}
Line:

Код:
if(GetPlayerName(playerid) < money)return SendClientMessage(playerid,COLOR_WHITE,"SERVER:You don't have enough money to put in bank!");
How can i solved it?


Re: warning 202: number of arguments does not match definition - Stanford - 15.07.2015

pawn Код:
if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid,COLOR_WHITE,"SERVER:You don't have enough money to put in bank!");
I hope I helped any feedback is appreciated.


Re: warning 202: number of arguments does not match definition - Moudix - 15.07.2015

Why GetPlayerName? it must be GetPlayerMoney.. Anyway if you want to use getplayername then refer to this :
https://sampwiki.blast.hk/wiki/GetPlayerName


Re: warning 202: number of arguments does not match definition - AnoTek - 15.07.2015

Thank you for your support

rep+