Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
problem w/ a qbasic program i'm working on...here's the code:
DECLARE SUB terraindraw ()
CLS
SCREEN 7
COLOR 2, 11terraindraw
LINE (100, 100)-(200, 100), 6END
SUB terraindraw
RANDOMIZE TIMER
y = 170FOR x = 0 TO 320
a = RND - .5
LINE (x, 200)-(x, y - a)
y = y - a
NEXT x
END
END SUB
when the program is run, it executes the SUB properly (draws the random terrain), but doesn't draw the final line. In fact, nothing after the SUB is executed, regardless of what it is. Plz help...i've toyed around w/ this 4 ever n can't figure out wat's wrong. thx

G'day,
My QBasic is a little rusty, but you have an END statement in the Subroutine, before the END SUB.
Wouldn't that END the programme at that point? therefore not getting to the final line.
REM it out and see what happens.
regards,
Elric

![]() |
VB real simple stuff
|
webpage disclaimer
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |