"The 2nd argument is not a text" error

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

TheGlamyChild

Member
Oct 24, 2024
1
0
1
22
Hello everyone, I get the error "the 2nd argument is not a text" for this Skript. I have been trying to fix it so it may be a mess now. Any help is much appreciated.

Code:
command /kazıkazan [<text>] [<number>]:
    trigger:
        if arg 2 is set:
            if arg 2 is a number:
                set {_amount} to arg 2 parsed as integer
            else:
                send "{@prefix} &cGeçersiz miktar girdiniz." to player
                stop
        else:
            set {_amount} to 1

        if arg 1 is not set:
            send "&b-----&9◀ &Premier&9 ▶&b-----"
            send "&2Bilet &aalmak için &3/kazıkazan bilet &8// &bFiyat: $300"
            send "&5Anahtar &aalmak için &3/kazıkazan anahtar &8// &bFiyat: $10"
            send "&b-----&9◀ &Premier&9 ▶&b-----"
            send "&aEn az ödül: &b$5"
            send "&aEn çok ödül: &b$150000 (150K)"
            stop

        if arg 1 is "bilet":
            set {_cost} to 300 * {_amount}
            if player's balance is greater than or equal to {_cost}:
                give {_amount} of paper named "&cKazı&6Kazan &2Bileti" with lore "&7&oAcaba içinden ne kadar çıkacak?" to player
                execute console command "/eco take %player% %{_cost}%"
                send "{@prefix} &5%{_cost}% &aödeyerek %{_amount}% Kazı Kazan bileti aldın." to player
            else:
                send "{@prefix} &cYeterince paran yok :("

        if arg 1 is "anahtar":
            set {_cost} to 10 * {_amount}
            if player's balance is greater than or equal to {_cost}:
                give {_amount} of lever named "&5Anahtar" with lore "&7&oKazı Kazan biletini kazımaya yarar." to player
                execute console command "/eco take %player% %{_cost}%"
                send "{@prefix} &5%{_cost}% &aödeyerek %{_amount}% Anahtar aldın." to player
            else:
                send "{@prefix} &cYeterince paran yok :("