Error 035: argument type mismatch (argument 2) x2.
#1

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

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

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);
Reply
#4

Ahhh! Thank you, such a small thing, I'm sorry, rep for the two of you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)