how do i use drawimage?

BlitzMax Forums/BlitzMax Beginners Area/how do i use drawimage?

drnmr(Posted 2005) [#1]
this is a section of my coding for the pic

image=LoadImage("smile man.bmp" ,True)
DrawImage image

it worked for my old Blitz BASIC program but obviously it doesnt now


JazzieB(Posted 2005) [#2]
Check the help files within BlitzMax. The parameters for LoadImage are different to previous versions of Blitz and you've completely missed off the x and y co-ordinates for DrawImage.

image:TImage=LoadImage(file,flags=-1)

DrawImage image:TImage,x,y,frame


drnmr(Posted 2005) [#3]
when i tried this it still for some reason didnt work
it said identifier image not found


Dreamora(Posted 2005) [#4]
graphics called before loading?


drnmr(Posted 2005) [#5]
wut???


Erroneouss(Posted 2005) [#6]
Did you call the 'graphics' command?


Bot Builder(Posted 2005) [#7]
The error probably means that you have "strict" at the top of your code meaning that you have to declare variables global or local.

Local image:TImage=LoadImage(file,flags=-1)

DrawImage image:TImage,x,y,frame



CGV(Posted 2005) [#8]
Do you have to keep identifying image as image:TImage throughout your code or was that just done here to avoid newbie confusion?

And yes I could just download the demo and test it myself but I'm waiting for when I know I'll have 30 days with plenty of free time.


Perturbatio(Posted 2005) [#9]
Do you have to keep identifying image as image:TImage throughout your code or was that just done here to avoid newbie confusion?

you don't need to specify the type once it has been declared.


CGV(Posted 2005) [#10]
Whoops!, forgot all about this post. A belated thanks Perturbatio.


Perturbatio(Posted 2005) [#11]
a belated np :)