Skip to content

Button value #528

Answered by Ted-juh
jojogib asked this question in Q&A
Jan 11, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Why is b+c 7 and not 6?

You are taking the value of the button which is 0 or 1. Thus assign new values with an if/else statement if button b or button c is on or off.

If b == 1 then b = 2 end
If c == 1 then c = 4 end

Local x = a+b+c

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jojogib
Comment options

@Ted-juh
Comment options

Answer selected by jojogib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants