warning 202: number of arguments does not match definition
#1

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?
Reply
#2

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.
Reply
#3

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

Thank you for your support

rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)