Since I always have problems I decided not to fill the forum with stupid questions and insted to put my questions and problems here
So here is the first one:
Atempt to acces field of null object...
Can anyone help me and tell me how to avoid these things in the future?
So here is the first one:
Strict Global terrain_img:Timage Type Tmap Field xtiles:Int Field ytiles:Int Field map:Ttile[,] End Type Type Ttile Field x:Int Field y:Int Field img:Int ' just the frame for the terrain_img End Type Global map:Tmap = New Tmap map.xtiles = 128 map.ytiles = 128 map.map = New Ttile[map.xtiles , map.ytiles] Local i:Int Local t:Int For i = 1 To map.xtiles For i = 1 To map.ytiles map.map[i , t].img = 1 Next Next
Atempt to acces field of null object...
Can anyone help me and tell me how to avoid these things in the future?