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)
+--- Thread: error 008: must be a constant expression; assumed zero (/showthread.php?tid=462498)



error 008: must be a constant expression; assumed zero - arko123 - 07.09.2013

What's wrong with this?

pawn Код:
new Business[System[Max_Businesses]][Business_Variables];



Re: error 008: must be a constant expression; assumed zero - Misiur - 07.09.2013

Quote:

must be a constant expression

You can't use a variable to initialise array, so you have to change System[Max_Businesses] to some constant value.


Re: error 008: must be a constant expression; assumed zero - arko123 - 07.09.2013

Quote:
Originally Posted by Misiur
Посмотреть сообщение
You can't use a variable to initialise array, so you have to change System[Max_Businesses] to some constant value.
So
pawn Код:
#define Max_Businesses 10
?


Re: error 008: must be a constant expression; assumed zero - Misiur - 07.09.2013

Yyup


Re: error 008: must be a constant expression; assumed zero - [HK]Ryder[AN] - 07.09.2013

Quote:
Originally Posted by arko123
Посмотреть сообщение
So
pawn Код:
#define Max_Businesses 10
?
Try it.