#How to use data storage input of text

1 messages · Page 1 of 1 (latest)

sturdy torrent
#

Im having a problem with a command that I want to use, its a macro and uses storage called "file". what I want to do is replace this with text from a command not pointing to an nbt source if possible.
$execute as @s[tag=small_room_north] at @s run place template dgen:level/$(file)/small_room_north This is the macro code, and I wanted to replace the file with text from this command data modify storage file text set value "demo". This I was hoping to output a file path to dgen:level/demo/small_room_north but instead got this error. This is another command calling on the macro function execute as @e[tag=main_room] as @n[sort=nearest,limit=1,tag=!main_room,tag=clear] run function dgen:generation/base_gen/v1/place with storage file.

karmic perchBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1746374683:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

sturdy torrent
tulip escarp
#

macro values need to be in the form of a key:value pair. as you've set up your storage, it will look something like file: {text: "demo"} which means running a function with storage file will have only text as a valid macro key

#

so specifically, you should either change your macro function to use $(text) instead of $(file) or change your storage command to point at something like storage file file

sturdy torrent
#

omg it worked 😮

#

thx sooo much, gonna go test it real quick with other stuff real quick

#

and if it bugs out ima ask here again

#

WOOOOOO less goo it works, now I have file pathing to custom dungeon templates :3

#

thx @tulip escarp !