123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|426|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> drawimage problems

Mon, 22 Dec 2008, 15:13
:-}



For some reason beyond my knowledge, when i run this program all i get is a black screen. I am not new to BB and don't see a probllem with this code. Maybe I am not looking correctly coudl someone help me?
Mon, 22 Dec 2008, 15:24
Phoenix
Works fine over here. You sure you supplied the correct file path? Is it in the right format; BMP, JPG or PNG? Try adding Flip() just before Cls, or add this right after the LoadImage line:



See if it produces an error.
Mon, 22 Dec 2008, 15:34
Evil Roy Ferguso
As Phoenix said, you need a Flip either before your Cls or before your Wend.

With double buffered graphics, nothing will be displayed on-screen until Flip. On some computers, when a program is run windowed, the display might update even when Flip is absent - which may be why the program worked for Phoenix. Just add it and you've nothing to worry about.

A minor style point -- in some fonts, 'l' and '1' look practically the same. I spent a moment myself trying to figure out why you were comparing 1 with itself.
Mon, 22 Dec 2008, 15:40
:-}
The flip worked wonderfully. Looking at my past programs I do have that in there. My mistake. Many thanks.



as for my variable l. This is just a rough outline of a program to come many things will change.

Thanks again i look forward to learning alot here.
Mon, 22 Dec 2008, 17:03
JL235
I is ok to use but it's a convention to use i (and j and k) for the index value in a loop. i.e.

You'll find this convention used right across programming languages so I would suggest you follow it.

In the place where your using i I'd also suggest calling it 'running' or 'isRunning' instead and set it to true. i.e.

IMHO: 'while isRunning' expresses what the code is doing in a more natural way then 'while not i = 1'.
Mon, 22 Dec 2008, 19:52
:-}
actually i was using a lowercase "L" and as I said before this is just a rough beginning of a future function for a project I am working on.