array of lists

BlitzMax Forums/BlitzMax Programming/array of lists

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Blitzmax arrays use square brackets.

Also, make sure you loop through the array and initialize each new list before you use it -- otherwise you'll be adding objects to null lists.

This should work:
Global mapList:TList[50,50]

For Local x:Int = 0 To 49
	For Local y:Int = 0 To 49
		mapList[x,y] = CreateList()
	Next
Next