number of arguments - 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: number of arguments (
/showthread.php?tid=482531)
number of arguments -
warlord321 - 21.12.2013
pawn Код:
D:\Game\RP\gamemodes\RP3.pwn(54770) : warning 202: number of arguments does not match definition
D:\Game\RP\gamemodes\RP3.pwn(54810) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
pawn Код:
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
format(string, sizeof(string), "You need to be at least rank 3 to use this command.", GetPlayerNameEx(playerid));
SendClientMessageEx(playerid, COLOR_BLUE); //hereproblem
return 1;
}
pawn Код:
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
format(string, sizeof(string), "HQ: %s has destroyed a cone.", GetPlayerNameEx(playerid));
SendClientMessageEx(playerid, COLOR_BLUE);//hereproblem
}
Re: number of arguments -
BlackWolf120 - 21.12.2013
please show us the stock function.
Re: number of arguments -
Konstantinos - 21.12.2013
The arguments are not equal to the number of them are required by that function. I assume it's the message (the 3rd parameter).
pawn Код:
SendClientMessageEx(playerid, COLOR_BLUE, string);
If it still gives a warning, then post the SendClientMessageEx. However, if SendClientMessageEx is only used to just send a normal message, replace with SendClientMessage.
Re: number of arguments -
CutX - 21.12.2013
//EDIT: too slow :/
pawn Код:
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
format(string, sizeof(string), "HQ: %s has destroyed a cone.", GetPlayerNameEx(playerid));
SendClientMessageEx(playerid, COLOR_BLUE,string);//hereproblem
}
[/pawn]
pawn Код:
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
format(string, sizeof(string), "You need to be at least rank 3 to use this command.", GetPlayerNameEx(playerid));
SendClientMessageEx(playerid, COLOR_BLUE, string); //hereproblem
return 1;
}
you forgot the "string" in SendClientMessageEx