Hi All, I am a noobie to Blitz3D. I'm not actually using the 3D components yet as I'm trying to wrap my head around 2D games still. Anyway, I've got a problem. I'm Trying to create a maze game using a single wall bitmap and data statements. The code appears to generate the maze, but also a dialogue box "Out of Data". Now being the newbie I am, I cant find the problem. I am trying to keep this maze code as simple as I can. Anyway, here is the source. Hope it comes up in those little code windows..... Any help would be greatly appreciated.
Cheers.
; Basically learning how to draw maps based on data statements ; it works except I receive: "Out of Data" error Graphics 640,480 SetBuffer BackBuffer() Global gfxwall = LoadImage("wall12.png") ; load 32x32 pixel wall image While Not KeyHit(1) Cls y=25 ; dont start drawing at the top of the screen For t = 0 To 14 ; read down the data For x = 15 To 480 Step 32 Read i If i<>0 Then ; only draw the tile if the data = 1 DrawImage gfxwall,x,y EndIf Next ;x y=y+32 ; make sure you dont overwrite tiles. Next ;y Flip Wend End Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 Data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1 Data 1,0,1,1,0,1,0,1,0,1,0,1,1,0,1 Data 1,0,0,1,0,1,0,1,0,1,0,1,1,0,1 Data 1,0,0,0,0,0,0,0,0,1,0,0,0,0,1 Data 1,0,1,0,0,1,1,1,0,1,0,1,1,0,1 Data 1,1,1,1,0,1,1,1,1,1,0,1,1,0,1 Data 1,0,0,0,0,1,1,0,0,0,0,0,1,0,1 Data 1,0,1,1,0,1,0,0,1,1,1,0,1,0,1 Data 1,0,0,0,0,1,0,1,1,1,0,0,1,0,1 Data 1,0,1,0,1,1,0,1,1,1,1,0,1,1,1 Data 1,0,1,1,1,0,1,0,0,0,1,1,1,0,1 Data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1 Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Cheers.