here's how i do it
IF BUTTON(0)==16 THEN GOTO @LOOP
16 is for the A button.
here is more
buttons:
16 - A
32 - B
64 - X
128 - Y
1 - up
2 - down
4 - left
8 - right
Avoid using labels and GOTOs. Structured programming is the way to go!
As far as buttons go, if you plan on working with various button inputs within a loop, you should assign BUTTON to a variable, like this...
BTN=BUTTON(2)
You can compare this variable using constants and logic gates. It follows a very simple, speech-like syntax!...
IF BTN AND (#A OR #B) THEN 'DO SOMETHING
I also suggest looking through the BUTTON commands help entry. It contains an explanation to the parameters that BUTTON can take, as well as a list of all button constants you can use.
my way works too. i did it wrong first. if you want to stay simple anyway. a better example
@example
if button()==16 then goto @loop
goto @example
the 16 stands for A button. more buttons are like 32 is the B button. 64 is X. 128 is Y. and etc. petit professor on youtube might be more help if he has a video on it. another example.
?"
?" press A to end the game.
?"
wait 10
goto @ex