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!


    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.

Solved Why is it not working?

Discussion in 'Skript' started by PantherBoy, Sep 7, 2017.

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

    PantherBoy Well-Known Member

    Jul 20, 2017
    Likes Received:
    Code (Skript):
    1. variables:
    2.     {case} = false
    3.     {jutalom} = 0
    4. command /case:
    5.     trigger:
    6.         if {case} is false:
    7.             if player's money is more than 9999:
    8.                 set {case} to true
    9.                 remove 10000 from the player's balance
    10.                 broadcast "&5A mágusraktár áldás aktiválva lett 5 percre"
    11.                 broadcast "&6Az áldást aktiválta: %player%"
    12.                 broadcast "&4A jutalmad megkapod a /jutalom parancsal"
    13.                 set {jutalom} to {jutalom} + 1
    14.                 wait 5 minutes
    15.                 set {case} to false
    16.                 message "&5A mágusraktár áldás lejárt!"
    17.             else:
    18.                 message "&cNincs elég pénzed"
    19.         else if {case} is true:
    20.             message "&cAz áldás már aktiválva van!"
    21. command /jutalom:
    22.     trigger:
    23.         if {jutalom.%player%} is more than 0:
    24.             message "&6Tessék a jutalmad:"
    25.             give player 1 diamond boots or 1 diamond chestplate or 1 diamond sword or 1 diamond helmet or 1 diamond leggings or 3 enchanted golden apples or 15 golden apples or 1 iron boots or 1 iron chestplate or 1 iron sword or 1 iron helmet or 1 iron leggings
    26.             set {jutalom.%player%} to {jutalom.%player%} - 1
    27.         else:
    28.             message "&cMár lehívtad a jutalmad!"
    The problem if when the case is true, and the player try to get the "jutalom", the jutalom.%player% is 0, so it writes the message.
    Why the program don't set the jutalom.%player% bigger?
    Sorry for my bad english :/
  2. ShaneBee

    Resource Staff Supporter + Addon Developer

    Sep 7, 2017
    Likes Received:
    Just do this:

    Code (Skript):
    2. add 1 to {jutalom.%player%}
Thread Status:
Not open for further replies.