SA-MP Forums Archive
Argument mismatch? WTF? - 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: Argument mismatch? WTF? (/showthread.php?tid=174077)



Argument mismatch? WTF? - sekol - 04.09.2010

Код:
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?


Re: Argument mismatch? WTF? - MadeMan - 04.09.2010

Change these:

#FF0000 > 0xFF0000FF

#FBFF00 > 0xFBFF00FF


Re: Argument mismatch? WTF? - sekol - 04.09.2010

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


Re: Argument mismatch? WTF? - MadeMan - 04.09.2010

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

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

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


Re: Argument mismatch? WTF? - sekol - 04.09.2010

Thanks again