Solved "" is not a date via nbt coumpound

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

MiiTsY

Active Member
May 27, 2022
50
1
8
Hello so I have a script to make a command that allows you to see an offline player's inventory which worked until I updated SkBee past 2.0 or 2.5, don't remember and now i just get the error : "world/playerdata/%the UUID of the 1st argument%" is not a date - when using "nbt compound from"

here's the code :
Code:
command /invsee <offline player>:
    permission: staff.admin
    trigger:
        if arg-1 is online:
            open inventory of arg-1 to player
        else if arg-1 has played before:
            set {_c} to (chest inventory with 4 rows)
            set {_inv::*} to (tag "Inventory" of file nbt compound from "{@world}/playerdata/%arg-1's uuid%")
            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
        else:
            send "&c%arg% &chas not played before"


for versions, check SS
1744167666984.png
 
Last edited:
Solved, after the update of SkBee, syntaxes changed, need an extra step now to retrieve the player data

Code:
command /invsee <offline player>:
    permission: staff.admin
    trigger:
        if arg-1 is online:
            open inventory of arg-1 to player
        else if arg-1 has played before:
            set {_c} to (chest inventory with 4 rows)
            set {_n} to nbt compound of file "world/playerdata/%arg-1's uuid%.dat"
            set {_inv::*} to compound list tag "Inventory" of {_n}
            loop {_inv::*}:
                set {_s} to tag "Slot" of loop-value
                set {_i} to nbt item from loop-value
                set slot {_s} of {_c} to {_i}
            open {_c} to player
        else:
            send "&c%arg% &chas not played before"