SA-MP Forums Archive
Weird Error? - 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: Weird Error? (/showthread.php?tid=271130)



Weird Error? - Dr - 23.07.2011

The error:
pawn Код:
Test.pwn(51) : error 035: argument type mismatch (argument 2)
The code:
pawn Код:
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, COLOR_GREEN, "Test!");
    return 1;
}

Line 51:
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "Test!");
COLOR_GREEN:
pawn Код:
#define COLOR_GREEN #008000
When I remove line 51, the error is gone... What am I doing wrong?


Re: Weird Error? - JaTochNietDan - 23.07.2011

You just need to add an 0x in front of it instead of the # symbol:

pawn Код:
#define COLOR_GREEN 0x008000



Re: Weird Error? - Dr - 23.07.2011

Thank you very much.