#1

pawn Код:
// This is at top of script
const COLOR_CYAN = 0x00F9F9FF;

// This is in a command
new Acolor[50];
Acolor = COLOR_CYAN;
SendClientMessage(playerid,Acolor,"You got cyan color.");
Compiler:

D:\gamemodes\gm.pwn(12215) : error 047: array sizes do not match, or destination array is too small
D:\gamemodes\gm.pwn(12216) : error 035: argument type mismatch (argument 2)

12215 -> Acolor = COLOR_CYAN;
12216 -> SendClientMessage(playerid,Acolor,"You got cyan color.");
Reply
#2

Just use it like this:
pawn Код:
#define COLOR_CYAN 0x00F9F9FF
SendClientMessage(playerid,COLOR_CYAN,"You got cyan color.");
Reply
#3

no , i want to use with variable , because i must use it in more places
Reply
#4

maybe you can use define it's every time works you can't create const for colours
Reply
#5

Quote:
Originally Posted by ByFukara
maybe you can use define it's every time works you can't create const for colours
same errors
Reply
#6

No bug, just you assigning an integer to an array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)