プレイ日記
Otacon otacon420
can you store button variables like this? or did i read it wrong?
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
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.
0そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
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.
0そうだね
プレイ済み
返信[3]
親投稿
Oscar PwnageBlock
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.
0そうだね
プレイ済み
返信[4]
親投稿
Oscar PwnageBlock
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!
0そうだね
プレイ済み
返信[5]
親投稿
PChicken NerdChicken
And on line 31, += will cause a syntax error as well.
1そうだね
プレイ済み
返信[6]
親投稿
Alex MrCashews
Use INC variable for variable++ and INC variable,amount for variable += amount.
1そうだね
プレイ済み
返信[7]
親投稿
Otacon otacon420
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.
0そうだね
プレイ済み
返信[8]
親投稿
Otacon otacon420
hows this for a better formatting example?
0そうだね
プレイ済み
返信[9]
親投稿
PChicken NerdChicken
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=""
1そうだね
プレイ済み