I made a program with several functions in it. Each function is basically a SEPERATE screen showing JPG images.
The problem is I need a LOOP within each function and when I do try to make a loop, it NEVER shows the images that are suppose to be shown. Instead the program goes to the function and Freezes up. for example
;initiate settings and stuff
;MAIN GAME LOOP
while not keydown(1)
; just 1 function
if such and such
thisscreen()
endif
wend
function thisscreen()
while not keydown(1); my loop that never works in the function
drawimage 1,20,20
if such and such
do this
endif
wend
end function
;and this is where the program freezes up. How can I
;correctly add a CONDITIONAL loop to a FUNCTION?
The problem is I need a LOOP within each function and when I do try to make a loop, it NEVER shows the images that are suppose to be shown. Instead the program goes to the function and Freezes up. for example
;initiate settings and stuff
;MAIN GAME LOOP
while not keydown(1)
; just 1 function
if such and such
thisscreen()
endif
wend
function thisscreen()
while not keydown(1); my loop that never works in the function
drawimage 1,20,20
if such and such
do this
endif
wend
end function
;and this is where the program freezes up. How can I
;correctly add a CONDITIONAL loop to a FUNCTION?