SA-MP Forums Archive
error 008: must be a constant expression; assumed zero - 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: error 008: must be a constant expression; assumed zero (/showthread.php?tid=196061)



error 008: must be a constant expression; assumed zero - DVDK - 04.12.2010

Код:
new RandomSkins[10] = {
{7},{29},{59},{60},{101},
{170},{185},{188},{250},{240}
};
Is causing me:
Quote:

X:\gamemode.pwn(2) : error 008: must be a constant expression; assumed zero




Re: error 008: must be a constant expression; assumed zero - DVDK - 04.12.2010

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
I compiled it fine, where are you executing RandomSkins?
Thanks for replying, i did this:

Код:
SetPlayerSkin(playerid, RandomSkins[random(sizeof(RandomSkins))]);



Re: error 008: must be a constant expression; assumed zero - DVDK - 04.12.2010

FOUND:

I had to add another array onto it: [1]
I never understood why..


Re: error 008: must be a constant expression; assumed zero - lavamike - 04.12.2010

Edit: nevermind guy above me has a better answer i guess