Jump to content




Help with scrolling text thing


  • You cannot reply to this topic
2 replies to this topic

#1 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 19 March 2014 - 04:12 AM

Topic for my program: http://www.computerc...rs-made-simple/
Lines having trouble with:
I've done some major fixing and stuff...
http://pastebin.com/ii02ZH2g - heres the full code, it probably needs some debugging
Ok, fixed that part... Now I just need to figure out how to make the text reset to the end of the screen when it has a number LESS than 5...

Edited by KingofGamesYami, 19 March 2014 - 05:26 PM.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 19 March 2014 - 05:09 AM

A fix for what? You haven't actually explained what you want this code to do, and how what it does differs from that.

Looking at the line you've highlighted:

if tlenth == 0-tlenth then

... I can tell you that the only circumstance where this will be true is when tlenth == 0. If it were any other value, then you'd be checking to see if a positive version of the variable is equal to a negative one; this will never be the case.

I'm somewhat perplexed by your use of the three different variables "tlength", "tlenth", and "tlenght". I'm of the impression that at least one of these is a typo.

#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 19 March 2014 - 02:35 PM

Yeah, I fixed the variable names now.. I was half-asleep when I wrote this code. Anyway, what I want that part to do is basically this: if text is off screen to the left, text is off screen to the right.
If your confused by some of the stuff I have, its probably because I used several shortcuts in my code: t = term t.sCP = t.setCursorPos m = peripheral.wrap(side) t.w = term.write
The variable starts positive, but it is in a loop that subtracts 1 each time

Edited by KingofGamesYami, 19 March 2014 - 02:40 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users