• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] Constants can't be used to give array size?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

I'm getting a "wrong [size]" error.

Here's the code:

JASS:
library myLib
globals
  constant integer I = 10
  constant integer J = 10
endglobals

struct myStruct
integer array ij[I * J] //this gives the error
endstruct
endlibrary

This is perplexing, because I read in the manual you can use constants in arrays. I don't see why the arithmetic functions can't be used to compute the array size either...
 
Status
Not open for further replies.
Top