Argument mismatch? WTF?
#1

Код:
public SetPlayerToTeamColor(playerid)
{
    if(gTeam[playerid] == POLAND) // ERROR HERE
    {
        SetPlayerColor(playerid, #FF0000);
	}
    if(gTeam[playerid] == GERMANY)
    {
        SetPlayerColor(playerid, #FBFF00); // ERROR HERE
    }
}
Код:
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(54) : error 035: argument type mismatch (argument 2)
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(58) : error 035: argument type mismatch (argument 2)
How to fix?
Reply
#2

Change these:

#FF0000 > 0xFF0000FF

#FBFF00 > 0xFBFF00FF
Reply
#3

Thanks it works, can you tell me how to get color codes like this?
Reply
#4

Just replace # with 0x and add FF at the end.

https://sampwiki.blast.hk/wiki/Hex_colors

https://sampwiki.blast.hk/wiki/Colors_List
Reply
#5

Thanks again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)