Thanks a lot to the both of you. Hopefully I'll be able to catch things like that better in the future.
EDIT: Okay, there is another problem.
In the second part of the tutorial, it talks about using a black box to cover up the health bar so that when a gradient is applied to the box, then the colors wont be balanced. I.E. if it goes from dark red to light blue, then instead of both colors being balanced no matter the width, the lower the health got, you'd see less and less of the blue. Here is my code as it is now.
Sync On
Sync Rate 30
Backdrop On
Color Backdrop 0
health = 100
Do
i$=upper$(inkey$())
if i$ = "Q"
dec health, 1
if health < 0 then health = 0
endif
if i$ = "W"
inc health, 1
if health > 100 then health = 100
endif
Box 10, 10, 10+(health*2), 20, RGB(100, 0, 0), RGB(100, 0, 0), RGB(255, 0, 0), RGB(255, 0, 0)
text 10, 22, "Health:"
text 70, 22, str$(health)
Box (health*2), 10, 10+(health*2), 20, RGB(0, 0, 0), RGB(0, 0, 0), RGB(0, 0, 0), RGB(0, 0, 0)
if health > 10
Ink RGB(255, 255, 255), 0
Else
Ink RGB(255, 0, 0), 0
Endif
Sync
Loop