Generate array size on the fly? (SOLVED)

Started by Rocco, Sat 04/02/2006 19:50:20

Previous topic - Next topic

Rocco

i try something like this

Code: ags


int enemycount = (lastenemy_slot - firstenemy_slot);
  
enemies enemy[enemycount];



and get an error -> Error (line 26): Array size must be constant value
but const int didnt work and readonly int is also no solution.

monkey0506

It's currently not possible.  Unfortunately.  You can use #define-s that are constant (you can't use expressions), enumerated values, or literal constants.  You can't use any form of expression...

Rocco

ok thx, this is not a big problem.
unfortunatly, a big problem is the limitation of 20 Overlays.

Gilbert


SMF spam blocked by CleanTalk