LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Unwanted Results with Locate

Root / Programming Questions / [.]

SaladFingersCreated:
For some reason when I run this code, line 5 and line 6 commands to print do not work. Is there a way to fix this?
ACLS
FOR U=1 TO 29
 COLOR #TWHITE:LOCATE 2,U
 LOCATE 3,U-1:PRINT CHR$(557727)
 LOCATE 1,U-1:PRINT CHR$(557726)
NEXT
 

What happens when the code is run? What do you expect should happen when the code is run? EDIT: Perhaps what you want is ;. On the bottom line of the screen, PRINT "TEXT" will cause all the text to scroll up. PRINT "TEXT"; will not. This is not an issue with LOCATE, it is an issue with PRINT. First rule of bug reporting: report what is wrong, not what you think is wrong.

Just to clear something up, I realize there is probably not a bug here so that's why I had said "unwanted results." Anyway I attached a photo and for some reason 28 and 29 are not properly printed compared to the other lines. I am actually not sure how to add a photo so I just added a URL. http://imgur.com/a/8JiU6

The photo you show is not of the code you posted.

It should print out the same thing. I actually made a typo and added an extra "7" in the CHR$'s

No, it will not. Nothing will be in column '2' for the code you show, something appears in column '2' of your screenshot.

Okay, my bad. I had offset my rows by one. Anyway I have fixed the problem, I'm sorry for my sounding rude and my disturbance.

That's fine. Next time, you can help us help you better by reporting what is wrong rather than what you think is wrong. It takes some practice, to suppress the 'helpful' instinct to say 'I have it half-solved, what's the other half?' - if you're having difficulty, it may be that the half-way you have travelled (identifying LOCATE as the problem, for instance) is in the wrong direction. So, report the problem from exactly where it occurs.