Skip to content

Restoring inventory from variable #35

@fredagsguf

Description

@fredagsguf

Description

set {staffinv::%uuid of player%::inventory} to the player's serialized inventory works just fine, but when you restore the inventory using restore inventory of player from {staffinv::%uuid of player%::inventory} it doesn't do anything and prints out the error below.

Steps to Reproduce

command /sm:
	trigger:
		if {staffmode::%uuid of player%} is not set:
			set {staffmode::%uuid of player%} to true
			set {staffinv::%uuid of player%::inventory} to the player's serialized inventory
			wait 1 tick
			clear player's inventory
			message "Turned on"
		else:
			delete {staffmode::%uuid of player%}
			message "Turned off"
			restore inventory of player from {staffinv::%uuid of player%::inventory}

Expected Behavior

I expected it to actually restore the inventory.

Errors / Screenshots

https://paste.gg/p/anonymous/eafb559482d540ffb6990b4e633b6a89

Server Information

Server version/platform: Paper-143
Skript version: Skript 2.4.1
SkQuery version: SkQuery 3.6.5


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions