SPSET 0,596
WHILE 1
VSYNC 40
SPCHR 0,597
VSYNC 40
SPCHR 0,596
WEND
Please guys, using labels with GOTO is unnecessary.
Also, I'm too lazy to look it up right now, but you could make all of this into one line using SPANIM.
WHILE (statement)
(commands)
WEND
If the statement is true, the program will do everything between WHILE and WEND and come back to WHILE. If the statement is false, the program skips everything between WHILE and WEND.
There's also this.
REPEAT
(commands)
UNTIL (statement)
This does the same thing, except it will always run the commands at least once.
Nate, the code you wrote:
MON=0
@GO
B=BUTTON()
IF B AND #A THEN MON=MON+1
LOCATE 0,0PRINT MON
GOTO @GO
Most of your code is wrong. Instead, it should be:
MON=0
WHILE 1
VSYNC 1
IF (BUTTON(1) AND 16)!=0 THEN INC MON
LOCATE 0,0:?MON
WEND
Believe me, it'll work a lot better.
Instead of doing all those empty PRINTs, try using variables.
-Replace Line 1 with X=4
-On Line 11, replace the 4 with X
-Remove everything below Line 14
-Replace Lines 12 and 13 with
IF B==1 THEN DEC X
IF B==2 THEN INC X
-Replace Line 9 with WHILE 1 and Line 14 with WEND
-Add VSYNC 1 between Lines 9 and 10
-Replace BUTTON(3) with BUTTON(1)
Hope this helped!
no no no GOTO and labels aren't meant to be used as loops Nate
To make loops it's either
WHILE (statement)
(stuff you want to do for as long as the statement is true)
WEND
or
FOR I=0 TO (amount of times)
(stuff you want to repeat)
NEXT
Anyways uh Adventurer, please read the manual
Hi, I worked on this.
From as far as I know, the program isn't public anymore.
I could upload it again, but I'm not the program's creator. I don't remember his name.
And don't worry guys, this program doesn't have anything exciting.