Posts: 1,047
Threads: 23
Joined: Jun 2009
You CANNOT declare array sizes with dynamic variables. You must count all the data and make the array big enough or if you don't know how big it is just use '[]'
Posts: 6,129
Threads: 36
Joined: Jan 2009
56 and MAX_VEHICLES are both constants, 'carcount' is a variable which isn't a constant. If you declare 'carcount' as a global constant/macro, that should work.
Posts: 950
Threads: 168
Joined: Mar 2009
Reputation:
0
#define somecount carcount
56+somecount? Or what then?
Posts: 6,129
Threads: 36
Joined: Jan 2009
No, just set a constant size, i.e: 256.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Yes, but the problem is you CANNOT specify a DYNAMIC size, therefore you MUST use a constant. The error message even tells you that!