finding if array is loaded with image

BlitzMax Forums/BlitzMax Beginners Area/finding if array is loaded with image

mudcat(Posted 2006) [#1]
In my type I have this
Global gun:timage[7],base:timage[7],ani:timage[7]

to check if gun is loaded(pun intended:) I tried this
If NOT gun[1] tpart.imageload()

but it is not working.reason why I was doing it this way is because of this code.
global image:timage

if NOT image image=loadimage("whatever.png")

But I'm guessing it doesn't work the same way for arrays.What is the better method to use?

Thanks,
mudcat


degac(Posted 2006) [#2]
if image=NULL image=LoadImage()
if gun[1]=NULL tpart.imageLoad()



mudcat(Posted 2006) [#3]
Thanks degac

mudcat