Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[887] ZScript compiling error

3 replies · 1,181 views · Started 18 November 2008

int test[96] = {4,3,6,6,6,6,7,3,3,3,6,6,3,6,3,4,6,6,6,6,6,6,6,6,6,6,2,3,4,6,4,5,6,6,5,5,5,5,5,5,5,4,5,5,5,6,5,5,5,5,5,5,4,5,5,6,5,4,5,4,4,4,4,5,3,5,5,4,5,5,5,5,5,2,4,4,2,6,5,5,5,6,5,5,5,5,5,6,4,5,5,0,0,0,0};

int test2[96] = {4,3,6,6,6,6,7,3,3,3,6,6,3,6,3,4,6,6,6,6,6,6,6,6,6,6,2,3,4,6,4,5,6,6,5,5,5,5,5,5,5,4,5,5,5,6,5,5,5,5,5,5,4,5,5,6,5,4,5,4,4,4,4,5,3,5,5,4,5,5,5,5,5,2,4,4,2,6,5,5,5,6,5,5,5,5,5,6,4,5,5,0,0,0,0,2};

These arrays are identical, but the first one has 95 elements initialized, while the second one has all 96. The compiler barfs on the second one:

ZQuest wrote:Pass 1: Parsing
Pass 2: Preprocessing
line 3: memory exhausted, on token 2
tmp, line 1: Error P01 : Failure to parse imported file quest2.z.

Does this happen if that's all you have inside of a function in that file? Is there a lot more code in the file or just a few more lines?

I always isolate it to a bare test case. Have just the second array in a blank file, with absolutely nothing else (even std.zh), and you get the error.