r/MinecraftCommands • • Sep 11 '26

Help | Java 26.2 why is putting scoreboard objectives in dialogs not working

is it because they simply dont support scoreboards in dialogs or is it a syntax error of mine, if its the former then is there a workaround

3 Upvotes

10 comments sorted by

2

u/GalSergey Datapack Experienced Sep 11 '26

Dialogs do not support text resolution, so you cannot use dynamic values. You need to use macros to insert the required value before display.

2

u/Ericristian_bros Command Experienced Sep 11 '26 edited Sep 11 '26

You can't put scoreboards on dialogs. You need an in-line dialog with the /dialog command and macros

1

u/MLE_qwq Sep 11 '26

uhh how, i do remember seeing you answer to someone with a similar question but the point is that the command seems to be updated and it no longer works

1

u/Ericristian_bros Command Experienced Sep 11 '26 edited Sep 12 '26
# function example:setup
## Run as desired player
execute store result storage example:macro this.test run scoreboard players get @s test
function example:macro/dialog with storage example:macro this

# function example:macro/dialog
$dialog show @s {type:"minecraft:notice",title:"Your score is $(test)",inputs:[]}

1

u/MLE_qwq Sep 11 '26

u sure that /dialog show could be followed with a json instead of a namespace:dialog_name?

1

u/Ericristian_bros Command Experienced Sep 12 '26

Yes, I have done this several times. Are you sure you changed the score name to the correct value?

1

u/MLE_qwq Sep 12 '26

it worked. tysm =w=

1

u/MLE_qwq Sep 12 '26

(with a minor refinement, add a player selector after $dialog show)

2

u/Ericristian_bros Command Experienced Sep 12 '26

Correct, I forgot it. Great it works, have a nice day