whats wrong with this arguments?
#1

Код:
CMD:givemoney(playerid, params[])
{
	new playerb, amount;
	if(sscanf(params,"ui",playerb,amount)) return SendClientMessage(playerid,lblue, "USAGE: /givemoney [playerid][amount]");
    if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,grey, "Invalid player id.");
	GiveDrichMoney(playerb,amount);
   	return 1;
}
if(sscanf(params,"ui",playerb,amount)) return SendClientMessage(playerid,lblue, "USAGE: /givemoney [playerid][amount]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,grey, "Invalid player id.");
this line where i get this error

Код:
test1.pwn(140) : error 035: argument type mismatch (argument 2)
test1.pwn(141) : error 035: argument type mismatch (argument 2)
Reply
#2

replace to:


replace to:


pawn Код:
CMD:givecash(playerid,params[])
    {
    new IDMoney;
    new str[128];

    if(sscanf(params, "d", IDMoney)== 0)
    {
    if(IsPlayerConnected(IDMoney))
    {
    SendClientMessage(playerid, COLOR_RED,"bla bla bla bla");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    GivePlayerMoney(i, IDMoney);
    }
    }
    else return SendClientMessage(playerid, COLOR_RED,"*** player not connected");
    }
    else return SendClientMessage(playerid, COLOR_RED,"*** command invalid!");
    return 1;
    }
Reply
#3

could be a problem in your color define
Reply
#4

o yeah the color define +rep tnx btw what is the right way in defining colors? coz i use this one just copied it in this forum

#define white "{FFFFFF}"
#define red "{F81414}"
#define green "{00FF22}"
Reply
#5

if error color define result:


Код:
error 017: undefined symbol "grey"
Reply
#6

pawn Код:
#define COLOR_GREY 0xAFAFAFFF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)