Multi Array throws 'Expression Must be Variable'

BlitzMax Forums/Brucey's Modules/Multi Array throws 'Expression Must be Variable'

RustyKristi(Posted 2016) [#1]
When checking out other examples in Vanilla, this works fine but building in NG I always get this error. Any ideas why is this happening or is there a different format?


xlsior(Posted 2016) [#2]
It is just showing a warning at compile time, or does it actually stop the program from running?


RustyKristi(Posted 2016) [#3]
hey xlsior, it stops the build exe process.


Brucey(Posted 2016) [#4]
Some actual examples might help resolve your issue :-)


RustyKristi(Posted 2016) [#5]
Thanks Brucey, something like this at ReadData

Local cols:Int, rows:Int, col:Int, row:Int
RestoreData data
ReadData cols, rows
Local block:Int[cols, rows]

For row = 0 Until rows
	For col = 0 Until cols
		ReadData block[col, row]
	Next
Next

#data
DefData 66,24
DefData 1,1,1...
...


This builds fine in vanilla


Brucey(Posted 2016) [#6]
That builds fine for me too :
SuperStrict

Framework brl.standardio

Local COLS:Int, rows:Int, col:Int, row:Int
RestoreData data
ReadData COLS, rows
Local block:Int[COLS, rows]

For row = 0 Until rows
	For col = 0 Until COLS
		ReadData block[col, row]
	Next
Next

For row = 0 Until rows
	For col = 0 Until COLS
		Print block[col, row]
	Next
Next

#data
DefData 2,5
DefData 1,1,1,1,1
DefData 2,2,2,2,2

which results in:
1
1
1
1
1
2
2
2
2
2



RustyKristi(Posted 2016) [#7]
Thanks. I'm using latest NG (0.70) copied your code above and still getting this error..




Again this perfectly builds on Vanilla, what seems to be the problem? It's really weird..


Brucey(Posted 2016) [#8]
The latest (latest) version of bcc in github is 0.78.
I need to try to find some time to do some new releases... of which I've been struggling of late.


Derron(Posted 2016) [#9]
Might explain your (RustyKristi) issues with the samples of my framework.
(to compile your own BCC you might need to do it with vanilla BlitzMax, as a conditional-flag might stop compilation of the current BCC with your old NG-BCC - as it expects certain functionality your old NG-BCC might not have yet).

@Brucey - might be a good idea to use custom conditionals for language features you introduce - or some kind of minversion ("?bmxng070" - which is false on vanilla, and potentially false in NG too).


bye
Ron


RustyKristi(Posted 2016) [#10]
Ok I'll be downloading the latest bcc (0.78) and will try this again. Yes, I'm aware that you need to use vanilla bcc to compile NG executables. I just did not know that the latest build could solve these issues being thrown.

thanks and brb..