1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Player empty inventory slot

Discussion in 'Skript' started by dxcf, May 21, 2020.

Thread Status:
Not open for further replies.
  1. dxcf

    dxcf Member

    Joined:
    Apr 8, 2020
    Messages:
    26
    Likes Received:
    0
    So i was having a problem trying to fill player's inventory with soup:

    Code (Skript):
    1. command /fillpots <player>:
    2.     executable by: console
    3.     trigger:
    4.         wait 1 seconds
    5.         if player has enough space for 1 iron chestplate:
    6.             set {_need} to 1
    7.         if player has enough space for 2 iron chestplate:
    8.             set {_need} to 2
    9.         if player has enough space for 3 iron chestplate:
    10.             set {_need} to 3
    11.         if player has enough space for 4 iron chestplate:
    12.             set {_need} to 4
    13.         if player has enough space for 5 iron chestplate:
    14.             set {_need} to 5
    15.         if player has enough space for 6 iron chestplate:
    16.             set {_need} to 6
    17.         if player has enough space for 7 iron chestplate:
    18.             set {_need} to 7
    19.         if player has enough space for 8 iron chestplate:
    20.             set {_need} to 8
    21.         if player has enough space for 9 iron chestplate:
    22.             set {_need} to 9
    23.         if player has enough space for 10 iron chestplate:
    24.             set {_need} to 10
    25.         if player has enough space for 11 iron chestplate:
    26.             set {_need} to 11
    27.         if player has enough space for 12 iron chestplate:
    28.             set {_need} to 12
    29.         if player has enough space for 13 iron chestplate:
    30.             set {_need} to 13
    31.         if player has enough space for 14 iron chestplate:
    32.             set {_need} to 14
    33.         if player has enough space for 15 iron chestplate:
    34.             set {_need} to 15
    35.         if player has enough space for 16 iron chestplate:
    36.             set {_need} to 16
    37.         if player has enough space for 17 iron chestplate:
    38.             set {_need} to 17
    39.         if player has enough space for 18 iron chestplate:
    40.             set {_need} to 18
    41.         if player has enough space for 19 iron chestplate:
    42.             set {_need} to 19
    43.         if player has enough space for 20 iron chestplate:
    44.             set {_need} to 20
    45.         if player has enough space for 21 iron chestplate:
    46.             set {_need} to 21
    47.         if player has enough space for 22 iron chestplate:
    48.             set {_need} to 22
    49.         if player has enough space for 23 iron chestplate:
    50.             set {_need} to 23
    51.         if player has enough space for 24 iron chestplate:
    52.             set {_need} to 24
    53.         if player has enough space for 25 iron chestplate:
    54.             set {_need} to 25
    55.         if player has enough space for 26 iron chestplate:
    56.             set {_need} to 26
    57.         if player has enough space for 27 iron chestplate:
    58.             set {_need} to 27
    59.         if player has enough space for 28 iron chestplate:
    60.             set {_need} to 28
    61.         if player has enough space for 29 iron chestplate:
    62.             set {_need} to 29
    63.         if player has enough space for 30 iron chestplate:
    64.             set {_need} to 30
    65.         wait 1 tick
    66.         if {potprefer::%arg-1's uuid%} is true:
    67.             make console execute command "minecraft:give %arg-1% minecraft:splash_potion{Potion:""minecraft:water"",CustomPotionEffects:[{Id:6,Amplifier:1}],display:{Name:""\""\\u00A7eHealth Potion\""""}} %{_need}%"
    68.         else:
    69.             make console execute command "minecraft:give %arg-1% minecraft:mushroom_stew{display:{Name:""{\""text\"":\""\\u00A7eSoup\""}""}} %{_need}%"
    In console:
    Code ( (Unknown Language)):
    1. [13:12:35] [Server thread/INFO]: Expected integer
    2. [13:12:35] [Server thread/INFO]: ...tion\""}} <none><--[HERE]
     
Thread Status:
Not open for further replies.

Share This Page

Loading...