#NBT Compounds Help

1 messages · Page 1 of 1 (latest)

opaque basin
#

Hello,
I'm a bit lost on how to turn this code into nbt compounds, any help is greatly appreciated.

 trigger:
  set {_inv::*} to (tag "Inventory" of file nbt of "Survival/playerdata/%uuid of arg%")"```
#

I get this error

drifting wasp
#

you're looking at the pre-2.0.0 syntax

opaque basin
#

Thanks

opaque basin
# drifting wasp

I'm still a bit confused, shouldnt this work?

 trigger:
  set {_c} to (chest inventory with 4 rows named "Inventory of %arg%")
  set {_i} to nbt compound of file "Survival/playerdata/%uuid of arg%"
  set {_inv::*} to tag "Inventory" of {_i}
  loop {_inv::*}:
   set {_s} to (tag "Slot" of loop-value)
   delete (tag "Slot" of loop-value)
   set slot {_s} of {_c} to item from nbt loop-value
  open {_c} to player```

It doesnt show the items
drifting wasp
#

can you broadcast {_i} and send a screenshot?

opaque basin
drifting wasp
#

then evidently it's not getting the tag correctly

#

are you sure you have the right path?

opaque basin
#

Oh, I have changed my directory to "Survival/playerdata/%uuid of arg%.dat" and I am now getting the inventory data but the gui is still empty

drifting wasp
#

looks like you're getting recipe names

opaque basin
#

I've also got inventory data (The message is like 500 lines long)

drifting wasp
#

then you need to speicifcally get the Items tag

#

you're trying to parse a bunch of random stuff as items right now

opaque basin
#

Oh I see

set {_inv::*} to tag "Inventory" of {_i}```
How would I specifically get the items tag? This is what I have at the moment
drifting wasp
#

Well it depends on the path

#

if it's just in the inventory tag, it's tag "Inventory;Items"

opaque basin
#

I'm just trying to get the inventory data from the .dat file

drifting wasp
#

yes that's what i'm saying

#

it depends on the path to the items tag

#

oh i see nvm

#

that's a shulker box you're showing

drifting wasp
#

the main issue is that {_c} is never set

opaque basin
#

Oh, I completely missed that

drifting wasp
#

yeah me too lol

opaque basin
#

Welp, that fixed it. Thank you for your time ❤️