Sorry, but #B is an invalid variable identifier. Anything that starts with a numeral (#) is considered a constant, which can't be assigned to. For example, #B is the constant for the B button bit mask. A correct identifier would be simply B.
Also, there is no need to pass 2 arguments to the BUTTON function unless you are using multiplayer. The first parameter selects the feature (type of button press) you want to get the status from, and the second one selects the terminal (multiplayer participant). For example, BUTTON(3) will return the status of all buttons released. You can check out all features on the help entry for BUTTON.
Some other notes...
Unlike some other languages, you don't need to finish each instruction with a semicolon (;). In fact, this will probably cause many errors, so I'd recommend erasing them.
Line 25 will also throw an error, since the syntax is wrong. I think you meant to do the assignment before the instruction, with the values in parenthesis being its arguments.
Finally, the GOTO on line 26 will throw an error too, since it's missing its argument, which is a label to go to.
If you need help with anything, or if you're new with SmileBASIC, just ask about it. This community is sure to help!
thanks for all the advice, greatly appreciated. ive been skimming through some of thrmanual, using "?" feature to looking for all the generic functions, and have been downloading some programs to see how it all works... its a little funky but looks fun, im not trying to accomplish much here so im sure it will be a fun week.
BUTTON() doesn't take the button references themselves.
Instead, do something like this:
HELD=BUTTON()
'RELEASED=BUTTON(3)
IF #A AND HELD THEN MSG="A is being held!" ELSE MSG=""