Help LoadAnimImage

BlitzMax Forums/BlitzMax Beginners Area/Help LoadAnimImage

MacSven(Posted 2005) [#1]
I Have this little code:

Global caroset = LoadAnimImage( "incbin::Cardset/peekall.png",73,97,0,15 )
' Load a Cardset with 16x16 Cards

Graphics 640,480
'Graphic Mode

Now i want draw a Card on the Screen

DrawImage caroset,100,40,1

but i get this Message:

Runtime Error

Attempt to access field or method of Null Object

What's wrong, in OldSkool2 demo it works?
Can anyone help me1


Sarge(Posted 2005) [#2]
try

IncBin "Cardset/peekall.png"
Global caroset = LoadAnimImage( "incbin::Cardset/peekall.png",73,97,0,15 )



MacSven(Posted 2005) [#3]
I have tried your version but nothing happens?


tonyg(Posted 2005) [#4]
You've got your loadanimage before the graphics command. The graphics command resets all previously loaded images.


Amon_old(Posted 2005) [#5]
Yep, tonyg is right. You have to set a graphics mode first then load your images.