Color Define - Color Error
#1

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);
Reply
#2

{B2E0A2} is for in-string colors, you should use 0xB2E0A2FF:
pawn Код:
#define COLOR_ARMYGREEN 0xB2E0A2FF
Reply
#3

You can only use the string representation in client messages and dialog boxes. SetPlayerColor requires an integer value.
Код:
0xB2E0A299
Reply
#4

SetPlayerColor expects integer, not string, so it should be:
Код:
SetPlayerColor(playerid, 0xB2E0A2);
In your code it is:
Код:
SetPlayerColor(playerid, "{B2E0A2}");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)