Player empty inventory slot

  • 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 comminuty!

    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!

Status
Not open for further replies.

dxcf

Member
Apr 8, 2020
26
0
1
23
So i was having a problem trying to fill player's inventory with soup:

code_language.skript:
command /fillpots <player>:
    executable by: console
    trigger:
        wait 1 seconds
        if player has enough space for 1 iron chestplate:
            set {_need} to 1
        if player has enough space for 2 iron chestplate:
            set {_need} to 2
        if player has enough space for 3 iron chestplate:
            set {_need} to 3
        if player has enough space for 4 iron chestplate:
            set {_need} to 4
        if player has enough space for 5 iron chestplate:
            set {_need} to 5
        if player has enough space for 6 iron chestplate:
            set {_need} to 6
        if player has enough space for 7 iron chestplate:
            set {_need} to 7
        if player has enough space for 8 iron chestplate:
            set {_need} to 8
        if player has enough space for 9 iron chestplate:
            set {_need} to 9
        if player has enough space for 10 iron chestplate:
            set {_need} to 10
        if player has enough space for 11 iron chestplate:
            set {_need} to 11
        if player has enough space for 12 iron chestplate:
            set {_need} to 12
        if player has enough space for 13 iron chestplate:
            set {_need} to 13
        if player has enough space for 14 iron chestplate:
            set {_need} to 14
        if player has enough space for 15 iron chestplate:
            set {_need} to 15
        if player has enough space for 16 iron chestplate:
            set {_need} to 16
        if player has enough space for 17 iron chestplate:
            set {_need} to 17
        if player has enough space for 18 iron chestplate:
            set {_need} to 18
        if player has enough space for 19 iron chestplate:
            set {_need} to 19
        if player has enough space for 20 iron chestplate:
            set {_need} to 20
        if player has enough space for 21 iron chestplate:
            set {_need} to 21
        if player has enough space for 22 iron chestplate:
            set {_need} to 22
        if player has enough space for 23 iron chestplate:
            set {_need} to 23
        if player has enough space for 24 iron chestplate:
            set {_need} to 24
        if player has enough space for 25 iron chestplate:
            set {_need} to 25
        if player has enough space for 26 iron chestplate:
            set {_need} to 26
        if player has enough space for 27 iron chestplate:
            set {_need} to 27
        if player has enough space for 28 iron chestplate:
            set {_need} to 28
        if player has enough space for 29 iron chestplate:
            set {_need} to 29
        if player has enough space for 30 iron chestplate:
            set {_need} to 30
        wait 1 tick
        if {potprefer::%arg-1's uuid%} is true:
            make console execute command "minecraft:give %arg-1% minecraft:splash_potion{Potion:""minecraft:water"",CustomPotionEffects:[{Id:6,Amplifier:1}],display:{Name:""\""\\u00A7eHealth Potion\""""}} %{_need}%"
        else:
            make console execute command "minecraft:give %arg-1% minecraft:mushroom_stew{display:{Name:""{\""text\"":\""\\u00A7eSoup\""}""}} %{_need}%"

In console:
Code:
[13:12:35] [Server thread/INFO]: Expected integer
[13:12:35] [Server thread/INFO]: ...tion\""}} <none><--[HERE]
 
Status
Not open for further replies.