This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message

Advanced Newbie

Joined: 20 Oct 2008
Posts: 57

Posted: 24 Jun 2009 03:24:49 pm    Post subject:

Ok, this is probobly a really simple fix, but it has been a while since I did BASIC, so here goes. in my game I display the integer for health, the variable is 'H'. 'H' is set to 100 at the begining of the game, and every time your ship gets hit by an asteroid, 10 is subtracted from your health. However, when the integer is displayed, it starts at 100, then says 900, 800, 700, 600, 500, 400, 300, 200, 100, 000. I think I know why, but would I just have another line of code that deletes the second zero? my code looks something like this, but I am not showing all of it, only that related to the health.

//if asteroid hits ship
//later in the code

Back to top
darkstone knight

Advanced Member

Joined: 07 Sep 2008
Posts: 438

Posted: 24 Jun 2009 03:44:07 pm    Post subject:

quick fix:

text(x,y,h," "
Back to top

Advanced Member

Joined: 25 Mar 2009
Posts: 360

Posted: 24 Jun 2009 03:48:59 pm    Post subject:

EDIT: I didn't realize that you hadn't erased your text. Darkstone is right in that case.

Last edited by Guest on 24 Jun 2009 03:50:01 pm; edited 1 time in total
Back to top

Advanced Newbie

Joined: 20 Oct 2008
Posts: 57

Posted: 24 Jun 2009 05:28:41 pm    Post subject:

ok, thanks, that worked
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours