Why is my Money Skript not Work?

  • 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.

DownHax

Member
Feb 23, 2017
8
0
0
28
Hey! idk why This Skript not work :/
Can anyone help me?


code_language.skript:
command /pay <text=help> <player>:
    permission: *
    trigger:
        if arg-1 is set:
            if arg-2 is not set:
                message ""
                message "&6&l✩&a&l&oMoney&6&l✩"
                message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
                message "&6&l✩&a&l&oMoney&6&l✩"
                message ""
            else if arg-2 is set:
                if arg-1 is smaller than {Money.%player%.Cash}:
                    set {A} to arg-1
                    remove arg-1 parsed as a number from {Money.%player%.Cash}
                    add arg-1 parsed as a number to {Money.%arg-2%.Cash}
                    send "" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send ""
                else if arg-1 is greater than {Money.%player%.Cash}:
                    send "1"
 
Hey! idk why This Skript not work :/
Can anyone help me?


code_language.skript:
command /pay <text=help> <player>:
    permission: *
    trigger:
        if arg-1 is set:
            if arg-2 is not set:
                message ""
                message "&6&l✩&a&l&oMoney&6&l✩"
                message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
                message "&6&l✩&a&l&oMoney&6&l✩"
                message ""
            else if arg-2 is set:
                if arg-1 is smaller than {Money.%player%.Cash}:
                    set {A} to arg-1
                    remove arg-1 parsed as a number from {Money.%player%.Cash}
                    add arg-1 parsed as a number to {Money.%arg-2%.Cash}
                    send "" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send ""
                else if arg-1 is greater than {Money.%player%.Cash}:
                    send "1"
i have the same error but with other type of plugin :/
 
Hey! idk why This Skript not work :/
Can anyone help me?


code_language.skript:
command /pay <text=help> <player>:
    permission: *
    trigger:
        if arg-1 is set:
            if arg-2 is not set:
                message ""
                message "&6&l✩&a&l&oMoney&6&l✩"
                message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
                message "&6&l✩&a&l&oMoney&6&l✩"
                message ""
            else if arg-2 is set:
                if arg-1 is smaller than {Money.%player%.Cash}:
                    set {A} to arg-1
                    remove arg-1 parsed as a number from {Money.%player%.Cash}
                    add arg-1 parsed as a number to {Money.%arg-2%.Cash}
                    send "" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send ""
                else if arg-1 is greater than {Money.%player%.Cash}:
                    send "1"

you dont need "IF" if not using "else". try this.

code_language.skript:
command /pay <text> <player>:
    permission: *
    trigger:
        arg-1 is set:
            arg-2 is not set:
                message ""
                message "&6&l✩&a&l&oMoney&6&l✩"
                message "&7-&8/&6Pay &7<&6Amount&7> <&6Player&7>"
                message "&6&l✩&a&l&oMoney&6&l✩"
                message ""
            arg-2 is set:
                if {Money.%player%.Cash} is more than or equal to arg 1:
                    set {A} to arg-1
                    subtract arg-1 from {Money.%player%.Cash}
                    add arg-1 to {Money.%arg-2%.Cash}
                    send "" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send "&bConsole &ahas given you &6&o%{A}% &aCash" to arg-2
                    send "&6&l✩&a&l&oMoney&6&l✩" to arg-2
                    send ""
                else:
                    arg-1 is greater than {Money.%player%.Cash}:
                    send "1"
 
Status
Not open for further replies.