If placed in a command block, it will make the player nearest the block with objective a set to 1 and objective b set to 2 (probably you, if you set those stats for yourself using the scoreboard) say "bleh" in the chat.
There is also this:
{{/execute if entity @p[scores={a=1,b=2}] run say hello}}
This will check for a player with the desired scores and then say "hello" if it finds a match.
Using something like:
{{/execute if score @p a matches 1 if score @p b matches 2 run say a is 1 and b is 2}}
Will do the exact same thing as above, but requires two if statements and is more to write.
Try something like this:
If placed in a command block, it will make the player nearest the block with objective a set to 1 and objective b set to 2 (probably you, if you set those stats for yourself using the scoreboard) say "bleh" in the chat.
There is also this:
This will check for a player with the desired scores and then say "hello" if it finds a match.
Using something like:
Will do the exact same thing as above, but requires two if statements and is more to write.
I hope this is helpful.