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



Bug ? - UsaBoy91 - 06.07.2009

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.");


Re: Bug ? - Correlli - 06.07.2009

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



Re: Bug ? - UsaBoy91 - 06.07.2009

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


Re: Bug ? - ByFukara - 06.07.2009

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


Re: Bug ? - UsaBoy91 - 06.07.2009

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


Re: Bug ? - yom - 06.07.2009

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