Re: TIB: RE: I NEED HELP


[Prev][Next][Index][Thread]

Re: TIB: RE: I NEED HELP




> I am using a TI-85. at Lbl DEAD it checks the score and
> checks to see if it beat any of the high scores. That is
> why there isn't a stop at the end there. I didn't include that
> part because it didnt have anything to do with my problem
> but if you want it here it is
> 
> BEGIN is not here because it is at the very begining of the
> program.

There is no Begin on the 85.

> Along with the prompt for NAME. S1-S5 and N1-N5 are in
> a seperate program called VARS it is used to set and
> reset the High Scores The first time you play.
> 
> Lbl DEAD
> ClLCD
> If SCORE>=S1
> Then

The Then command indicates the start of a conditon.

> S4/->/S5
> S3/->/S4
> S2/->/S3
> S1/->/S2
> SCORE/->/S1
> N4/->/N5
> N3/->/N4
> N2/->/N3
> N1/->/N2
> NAME/->/N1
> Goto Finish

YOU DID NOT END YOUR LOOP AT ALL. You must add an End
before the Goto to indicate the end of the condition. Otherwise, the
calculator will still think it's in the If-Then statement. That will take
up memory and eventually cause the program to crash.

> If SCORE>=S2
> Then
> S4/->/S5
> S3/->/S4
> S2/->/S3
> SCORE/->/S2
> N4/->/N5
> N3/->/N4
> N2/->/N3
> NAME/->/N2

End

> Goto Finish
> 
> If SCORE>=S3
> Then
> S4/->/S5
> S3/->/S4
> SCORE/->/S3
> N4/->/N5
> N3/->/N4
> NAME/->/N3

End

> Goto Finish
 
> If SCORE>=S4
> Then
> S4/->/S5
> SCORE/->/S4
> N4/->/N5
> NAME/->/N4

End

> Goto Finish
> 
> If SCORE>=S5
> Then
> SCORE/->/S5
> NAME/->/N5

End

> Goto Finish

You don't need that Goto because it will run Finish anyway. Lbl
Finish is the next command. It doesn't have to go anywhere, since
it runs the next line anyway. You still need the End to end the
condition though.

> Lbl Finish
> 
> Outpt(1,1,"..............."
> Outpt(1,1,N1
> Outpt(1,16,S1
> 
> Outpt(2,1,"..............."
> Outpt(2,1,N2
> Outpt(2,16,S2
> 
> Outpt(3,1,"..............."
> Outpt(3,1,N3
> Outpt(3,16,S3
> 
> Outpt(4,1,"..............."
> Outpt(4,1,N4
> Outpt(4,16,S4
> 
> Outpt(5,1,"..............."
> Outpt(5,1,N5
> Outpt(5,16,S5
> 
> Menu(1,"YES",BEGIN,2,"NO",DONE)
> Lbl DONE
> ClLCD
> stop