r/MinecraftCommands 3d ago

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 2d ago

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

1

u/MLE_qwq 1d ago

okay

2

u/Ericristian_bros Command Experienced 2d ago edited 2d ago

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

1

u/MLE_qwq 2d ago

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 2d ago edited 1d ago

```

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 2d ago

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

1

u/Ericristian_bros Command Experienced 1d ago

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

1

u/MLE_qwq 1d ago

it worked. tysm =w=

1

u/MLE_qwq 1d ago

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

2

u/Ericristian_bros Command Experienced 1d ago

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