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.

Cant figure out where to put "else"

Discussion in 'Skript' started by Viito, Oct 9, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. Viito

    Viito Member

    Joined:
    Oct 9, 2021
    Messages:
    1
    Likes Received:
    0
    I want to put
    Code (Text):
    1. else:
    2.     send "&cYou cannot afford this item!"
    for both ifs in this code but i cannot figure out how to do it (im using TuSke although it might not matter bcuz its just if and else)
    Code (Text):
    1. if {balance::%uuid of player%} > 149:
    2.     remove unbreakable shears of efficiency 3 named "&7Shears &b[&7Lvl &61&b]" from player's inventory
    3.     remove 150 from {balance::%uuid of player%}
    4.     give player unbreakable shears of efficiency 5 named "&7Shears &b[&7Lvl &62&b]"
    5.     set {tier} to 3
    6.     format gui slot 11 of player with unbreakable shears of efficiency 7 named "&7Shears &b[&7Lvl &63&b] &6$300" with lore "&7gained after purchase" to run:
    7.         if {balance::%uuid of player%} > 299:
    8.             remove unbreakable shears of efficiency 5 named "&7Shears &b[&7Lvl &62&b]" from player's inventory
    9.             remove 300 from {balance::%uuid of player%}
    10.             give player unbreakable shears of efficiency 7 named "&7Shears &b[&7Lvl &63&b]"
    11.             set {tier} to 4
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    you know that {tier} is a global non specific variable?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...