Loading a level from data...

BlitzMax Forums/BlitzMax Beginners Area/Loading a level from data...

I can load a level from data using this code, but how can I load the next level? I was thinking to add *LevelPlaying somewhere but I can't get it working.

Method Load()

	Local X:Int,Y:Int,Entry:String
		
	Array = New Int [LevelWidth,LevelHeight]
		
	For Y = 0 Until LevelHeight
			
		ReadData Entry

		For X = 0 Until LevelWidth

			Array[X,Y] = Int (Mid(Entry,X+1,1))

		Next

	Next

EndMethod


Loading this data:
DefData "11111111111111111111"
DefData "10000000000000000001"
DefData "10000000000000000001"
DefData "11111100000000111111"
DefData "10000000011000000001"
DefData "10000000000000000001"
DefData "11000000000000000011"
DefData "10000001100110000001"
DefData "11100000000000000111"
DefData "10000000000000000001"
DefData "11110011011011001111"
DefData "10000000000000000001"
DefData "10001100000000110001"
DefData "10000000000000000001"
DefData "11111111111111111111"