source file = your code
e.g. if this is the location of your sourcecode:
c:\Blitzplus\
and you have some bla=LoadImage("hero.jpg") in your code, then this hero.jpg has to be in the same dir as your sourcecode e.g. c:\Blitzplus\
If you create an .exe and move this exe to another dir, say, e:\stuff\ then the exe searches that hero image in e:\stuff\ .. and ofcourse it might not be there. This is why Blitzmax has incbin btw, no more loose files everywhere.
In case you're loading stuff (images, sounds, maps, everything) it's best to have a minor check routine to see if it's loaded correctly.
E.g.
bla=LoadImage("moo.jpg")
If Not bla Notify "moo.jpg not found!"
I tend to use functions for that to make things easier for me.
E.g.
Function LoadImage2(file$)
bla=LoadImage(file$)
If Not bla
Notify "y0! wazzaaaah! where's teh "+file$+" file gone eh?"
End
EndIf
Return bla
End Function
|