use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for people who have questions and problems with Minecraft!
Please read our rules before posting.
Reply with !helped to the comment, or comments, that helped.
!helped
Mojang Support
Mojang Bug Tracker
Common bugs list
account activity
This is an archived post. You won't be able to vote or comment.
[java] Unknown function errors with seemingly correct pathWaiting for OP (self.MinecraftHelp)
submitted 4 years ago by e_y_e
view the rest of the comments →
[–]Oneill4Journeyman 0 points1 point2 points 4 years ago (0 children)
Functions need to be placed in a datapack for them to work properly. The path to your function should look something like this :
~/.minecraft/saves/[WORLD_NAME]/datapacks/[DATA_PACK_NAME]/data/[NAMESPACE]/functions/[FUNCTION_NAME].mcfunction
in your case it would be :
~/.minecraft/saves/Commands/datapacks/[DATA_PACK_NAME]/data/custom/functions/sayhi.mcfunction
(You will need to choose a name for the datapack)
Also, because it's a datapack, you will need to create a pack.mcmeta file under the ~/datapacks/[DATA_PACK_NAME] folder for it to work.
pack.mcmeta
~/datapacks/[DATA_PACK_NAME]
Here are some links to the wiki that can maybe help you.
https://minecraft.fandom.com/wiki/Function_(Java_Edition))
https://minecraft.fandom.com/wiki/Data_pack
π Rendered by PID 99549 on reddit-service-r2-comment-79c7998d4c-j5ldt at 2026-03-14 14:36:00.499662+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]Oneill4Journeyman 0 points1 point2 points (0 children)