The error is a missing "(i)" at the draw string buffer.
Shouldn't the compiler give a warning?
Code: Select all
#include "fbgfx.bi"
sub panic(text as string)
print text
getkey()
end -1
end sub
const as long SW = 800, SH = 600
screenres SW, SH, 32
width SW \ 8, SH \ 16
const as long N_IMG = 10
dim as fb.image ptr pImg(N_IMG - 1)
for i as long = 0 to ubound(pImg)
pImg(i) = imageCreate(12, 16)
if pImg(i) = 0 then panic("Error: image create fail!")
draw string pImg, (2, 0), str(i)
put(i * 20, 0), pImg(i), pset
next
for i as long = 0 to ubound(pImg)
imageDestroy(pImg(i))
pImg(i) = 0
next
getkey()