Color Define - Color 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)
+--- Thread: Color Define - Color Error (
/showthread.php?tid=447627)
Color Define - Color Error -
Jay_Dixon - 30.06.2013
Ok, so it let me define the color i wanted as (refer to first code thing), and compiled with no errors. But when i tried to add it to (second code thing), it gave off this error. What am i doing wrong with this color? Because i've seen other scripts that use this way to define colors, and those didn't have problems
Код:
C:\Users\Jay\Desktop\FRP\gamemodes\ECRP.pwn(34878) : error 035: argument type mismatch (argument 2)
Код:
#define COLOR_ARMYGREEN "{B2E0A2}"
Код:
SetPlayerColor(playerid, COLOR_ARMYGREEN);
Re: Color Define - Color Error -
IstuntmanI - 30.06.2013
{B2E0A2} is for in-string colors, you should use 0xB2E0A2FF:
pawn Код:
#define COLOR_ARMYGREEN 0xB2E0A2FF
Re: Color Define - Color Error -
Vince - 30.06.2013
You can only use the string representation in client messages and dialog boxes. SetPlayerColor requires an integer value.
Re: Color Define - Color Error -
Scottas - 30.06.2013
SetPlayerColor expects integer, not string, so it should be:
Код:
SetPlayerColor(playerid, 0xB2E0A2);
In your code it is:
Код:
SetPlayerColor(playerid, "{B2E0A2}");