arrgument type mismatch (argument 2)
#1

I'm getting this error ^, here:
pawn Код:
case DIALOG_CHOOSETEAM:
        {
            if(!response) return ShowPlayerDialog(playerid, DIALOG_CHOOSETEAM, DIALOG_STYLE_LIST, ""COL_GREEN"TEAMS", ""COL_LIGHTBLUE"Marine Raiders(Known as America)\n"COL_RED"Red Army(Known as Sovjet Unie)", "Choose", "");
            if(response)
            {
                if(listitem == 0)
                {
                    gTeam[playerid] = TEAM_MARINERAIDERS;
                    SetPlayerColor(playerid, TEAM_MARINERAIDERS_COLOUR); // AND HERE
                    SpawnPlayer(playerid);
                }
                if(listitem == 1)
                {
                    gTeam[playerid] = TEAM_REDARMY;
                    SetPlayerColor(playerid, TEAM_REDARMY_COLOUR); // OVER HERE
                    SpawnPlayer(playerid);
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#2

You're adding an excess argument:

Correct usage:

pawn Код:
SetPlayerColor(playerid, 0xFFFF00AA);
So, do it like "If [something something] - and then SetPlayerColor using the above example.

ED: Misread your code, change your COLOR names to something else, possibly a COLOR without two underscores. Not sure.

ED again: Oh yes. It needs to be an integer or hex. So, do what the person suggested in post #4.
Reply
#3

show how you defined 'TEAM_MARINERAIDERS_COLOUR' and 'TEAM_REDARMY_COLOUR'
Reply
#4

#define TEAM_MARINERAIDERS_COLOUR "{00CED1}"
#define TEAM_REDARMY_COLOUR "{F81414}"
Reply
#5

Are you using those macros to send client messages with those colors? If so, I recommend making new ones like this:
pawn Код:
#define MARINERAIDERS_COLOUR 0x00CED1FF
#define REDARMY_COLOUR 0xF81414FF
then use those for SetPlayerColor.
Reply
#6

Thanks Seif-, +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)