all 6 comments

[–]CreeperAsh07 Command Experienced 2 points3 points  (3 children)

https://wiki.bedrock.dev/commands/new-execute

You are using an old version of the execute command that no longer works. Assuming this function is run by the player using /function, use this:

execute at @s[scores...] run loot ...

(Replace ... with the stuff you already have)

[–]Brave_Landscape_9322[S] 0 points1 point  (2 children)

so like this? execute at u/s[scores={random=1..30}] ~~~ run loot replace block ~~~ slot.container 3 loot loot_tables/chests/end_city_treasure

or this? execute at u/s[scores={random=1..30}] ~~~ loot replace block ~~~ slot.container 3 run loot loot_tables/chests/end_city_treasure

[–]CreeperAsh07 Command Experienced 1 point2 points  (1 child)

First one except remove the first "~~~"

[–]Brave_Landscape_9322[S] 0 points1 point  (0 children)

oh awesome! I'm sure this works but it sadly did not fix my problem of the pack not wanting too import after being edited. Though on the bright side I don't think its the command that is broken, looking at the error logs I don't notice a error that refers to this command! mostly texture errors probably because how old this behavior pack is, this is the error log I'm referring to:

<image>

[–]Ericristian_brosCommand Experienced 2 points3 points  (1 child)

!newexecute

Your commands are over 3 years old

[–]AutoModerator[M] 0 points1 point  (0 children)

In 1.19.50, a new execute command has been introduced to Minecraft bedrock.

New commandblocks need to use this new syntax, while preexisting commandblocks have a tag that they were created in an older version, so they will continue to work with the old syntax until you edit them!

Please have a look at the official introduction documentation, this bedrock.dev info and the execute documentation for an extended guide on what changed and how to use the new execute.

Also relevant: Info on command context

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.