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.

Why is my Money Skript not Work?

Discussion in 'Skript' started by DownHax, Feb 24, 2017.

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

    DownHax Member

    Joined:
    Feb 23, 2017
    Messages:
    8
    Likes Received:
    0
    Hey! idk why This Skript not work :/
    Can anyone help me?


    Code (Skript):
    1. command /pay <text=help> <player>:
    2.     permission: *
    3.     trigger:
    4.         if arg-1 is set:
    5.             if arg-2 is not set:
    6.                 message ""
    7.                 message "&6&l✩&a&l&oMoney&6&l✩"
    8.                 message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
    9.                 message "&6&l✩&a&l&oMoney&6&l✩"
    10.                 message ""
    11.             else if arg-2 is set:
    12.                 if arg-1 is smaller than {Money.%player%.Cash}:
    13.                     set {A} to arg-1
    14.                     remove arg-1 parsed as a number from {Money.%player%.Cash}
    15.                     add arg-1 parsed as a number to {Money.%arg-2%.Cash}
    16.                     send "" to arg-2
    17.                     send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
    18.                     send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
    19.                     send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
    20.                     send ""
    21.                 else if arg-1 is greater than {Money.%player%.Cash}:
    22.                     send "1"
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    i have the same error but with other type of plugin :/
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Change this for: (not tested, but intent)

    Code (Skript):
    1.                 if arg-1 < {Money.%player%.Cash}:
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    you dont need "IF" if not using "else". try this.

    Code (Skript):
    1. command /pay <text> <player>:
    2.     permission: *
    3.     trigger:
    4.         arg-1 is set:
    5.             arg-2 is not set:
    6.                 message ""
    7.                 message "&6&l✩&a&l&oMoney&6&l✩"
    8.                 message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
    9.                 message "&6&l✩&a&l&oMoney&6&l✩"
    10.                 message ""
    11.             arg-2 is set:
    12.                 if {Money.%player%.Cash} is more than or equal to arg 1:
    13.                     set {A} to arg-1
    14.                     subtract arg-1 from {Money.%player%.Cash}
    15.                     add arg-1 to {Money.%arg-2%.Cash}
    16.                     send "" to arg-2
    17.                     send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
    18.                     send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
    19.                     send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
    20.                     send ""
    21.                 else:
    22.                     arg-1 is greater than {Money.%player%.Cash}:
    23.                     send "1"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...