bug when drawing loaded image

Archives Forums/BlitzMax Bug Reports/bug when drawing loaded image

z80jim(Posted 2008) [#1]
I was fooling around with simple loading an image into a program, then drawing it. It was working fine, until I added a normal .jpeg image into it, then it started finding faults with my program, for instance it thought something was wrong with my setcolor line lol. I used a little catch to make sure it was loading properly, it passed the test. Then I removed the recently added line and it functioned properly again. I checked and double checked and checked against other image printing lines that I know work, nothing is wrong. here is the troublesome part.

Function update()

For i=0 To 999 Step 1
For c=0 To 999 Step 1
x[i]=i*40
y[c]=c*40
SetColor 255,255,255'it finds fault with this line when the drawimages are in place. when I remove this line, it finds fault with my random.
random=Rnd(1,2)
If random=1 Then DrawImage (grass:TImage,x[i],y[c])'program only works when this and the next line are commented out.
If random=2 Then DrawImage water:TImage,x[i],y[c]
SetColor 0,0,255
DrawRect manx,many,39,39
Next
Next
Flip
EndFunction