Error 035: argument type mismatch (argument 2) x2. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error 035: argument type mismatch (argument 2) x2. (
/showthread.php?tid=275162)
Error 035: argument type mismatch (argument 2) x2. -
iGetty - 08.08.2011
LINE: (31763) : error 035: argument type mismatch (argument 2)
LINE: (31765) : error 035: argument type mismatch (argument 2)
Here are the two lines:
31763
pawn Код:
SendToTesters(i, GREEN, string, 0);
31765
pawn Код:
SendToTesters(i, GREEN, string, 0);
Here is my SendToTesters part:
pawn Код:
public SendToTesters(colour, string[], requireduty)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx(i))
{
if(Player[i][Tester] >= 1)
{
if(requireduty == 1 && Player[i][HelperDuty] == 1 && Player[i][AFKStat] == 0)
{
SendClientMessage(i, colour, string);
}
else if(requireduty == 0)
{
SendClientMessage(i, colour, string);
}
}
}
}
return 1;
}
It is forwarded with:
pawn Код:
forward SendToTesters(colour, string[], requireduty);
Appreciate all the help I could get.
Re: Error 035: argument type mismatch (argument 2) x2. -
Sascha - 08.08.2011
SendToTesters(i, GREEN, string, 0); << your useage
public SendToTesters(colour, string[], requireduty) << the public
notice that you are using 4 parameters while the callback only has 3?
Respuesta: Error 035: argument type mismatch (argument 2) x2. -
OwlCity - 08.08.2011
You have 3 arguments, colour, string and requireduty.
In the line you have: "i", Green, string, "0".
Try to delete "i".
pawn Код:
SendToTesters(GREEN, string, 0);
Re: Error 035: argument type mismatch (argument 2) x2. -
iGetty - 08.08.2011
Ahhh! Thank you, such a small thing, I'm sorry, rep for the two of you.