Tim
Tim

Reputation: 375

TI Calculator Programming, Won't Display Graph?

So I'm making an achievement system in a game, and I'm having a little trouble. You click on achievements, then trophy case, and then inspect for a description of each achievement. I got this working earlier, but I don't know what I changed. Can you take a look at a chunk of the code?

:Lbl 15

:ClrDraw

:Text(5,8,[argument]

:

:

:Line(-10,6,10,-6)

Basically, it should pull up the graph, and make the line and text. Instead it displays the home screen, and when I press ENTER, it goes back to the beginning of the program. Is there something wrong here?

Upvotes: 0

Views: 172

Answers (2)

Vaelus
Vaelus

Reputation: 1065

The DispGraph command will display the graph screen. The code you have shown, however, is right, and should display the graph screen automatically.

I would advise that you look over your code, specifically the Goto statement leading to Lbl 15, and make sure it's pointing to the right place. If it is, then the problem is probably after the code you have shown. You mentioned that this block of code has an End at the end; why? Lbls should not have a corresponding End, if it is there, it will jump back to the most recent loop control block, which could cause any number of problems.

Upvotes: 0

Boone
Boone

Reputation: 167

Try saving a blank image as a picture (for instance Pic1), then recall this using the "RecallPic" command. This will get you to the graphing screen. From there do all of your plotting commands like "Text" and "Line". If this doesn't work then I'd say you need to post some more code, cause there's some other problem than simply displaying.
Also, check to make sure all of your loops and "if/then" statements have an "end" on them. You mentioned there was an unknown "end" at the end... That can cause a lot of trouble. It's the equivalent of missing an end parentheses or bracket in other languages.

Upvotes: 0

Related Questions