Okay let's think for a second... You want to say, "If the amount of lives you has goes below 0, then make it equal 0." and "If the amount of lives you have goes above the maximum amount, then make it equal the amount." Now, your code says: "If the amount of lives goes above or becomes the maximum amount of lives, then make it equal the maximum amount of lives." That's fine. But now you say, If the amount of lives goes under the maximum amount of lives, then make it 0." That says, "if you have 60 lives left you have 0 because I don't like you. Ha ha ha!" That's not what you want. So instead, say "If the amount of lives goes under 0, then make it 0"
Here's your code:
sync on : sync rate 90
on=1
off=0
lives=3
maxlives=99
make object sphere 10,100
do
set text size 24
text 0,20,str$(lives)
text 0,0,"Lives:"
if upkey()=on
inc lives,1
endif
if downkey()=on
dec lives,1
endif
rem If the number of lives goes over the maximum (99), then make it equal the maximum.
if lives>=maxlives
lives=maxlives
endif
rem If the amount of lives is less than 0, then it becomes 0.
if lives<0
lives=0
endif
sync
loop
EDIT:
@ Open Froz:
ARG you just beat me!