error 035: argument type mismatch (argument 2)
#1

PHP Code:
if(InDM[playerid] == && PlayerInfo[playerid][Color] == 1) {
        new 
colorhex[128];
        switch(
PlayerInfo[playerid][pColor]) {
            case 
1colorhex "0xFF0000AA";
            case 
2colorhex "0x00FFFFAA";
            case 
3colorhex "0xFFFF00AA";
            case 
4colorhex "0x33FF33AA";
            case 
5colorhex "0xFF00FFC8";
            case 
6colorhex "0x2C2727AA";
            case 
7colorhex "0xFFFFFFAA";
        }
        switch(
PlayerInfo[playerid][team]) {
            case 
TEAM_WORKERSetPlayerColor(playerid,colorhex);//<<<Line 21729
            
case TEAM_blablaSetPlayerColor(playerid,colorhex);//<<<Line 21730
            
...
        }

Code:
(21729) : error 035: argument type mismatch (argument 2)
(21730) : error 035: argument type mismatch (argument 2)
...
How to fix this?
Reply
#2

If you search on the wiki for SetPlayerColor:
Quote:

Description:
Set the colour of a player's nametag and marker (radar blip).
Parameters:
(playerid, color)
playerid The ID of the player whose color to set.
color The color to set. Supports alpha values.

It is not a string. Hexadecimal is a number. So use a define maybe or use it as int however you want to.

An advice: When every you egt type mismatch etc so please search for native function to get a clear idea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)