202 warning
#1

cant figure out why im copping a 202 warning
"number of arguments does not match definition"
this is the line thats getting it:
Код:
format(string, sizeof(string), "* %s has started the warmup.", GetPlayerName(playerid));
heres the whole command
Код:
CMD:warmup(playerid, params[])
{
	new string[128];
	format(string, sizeof(string), "* %s has started the warmup.", GetPlayerName(playerid));
        SendFCMessage(playerid, COLOR_FCALERT, string);
	return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerName

You could do this

pawn Код:
stock PlayerName(playerid)
{
    new Pname[24];
    GetPlayerName(playerid, Pname, 24);
    return Pname;
}
Then get the player name like you were.

pawn Код:
format(string, sizeof(string), "* %s has started the warmup.", PlayerName(playerid));
Reply
#3

pawn Код:
CMD:warmup(playerid, params[])
{
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName);

format(string, sizeof(string), "* %s has started the warmup.", pName);
SendFCMessage(playerid, COLOR_FCALERT, string);
eturn 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)