I need help on this script part

  • 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.
Jun 25, 2019
2
0
1
21
Hamburg, germany
apfelnetzwerk.de
When i reloading this script then come an error ("'%arg-2%' is not an entity type (globalcoins.sk, line 35: add %arg-2% to {globalcoins.%player%}')"). It always worked that way. That's why I'm wondering that it does not work now

Can someone help me please?

Code:
            if arg 1 is "add":
                if arg 2 is set:
                    message "&8Setup/Edit the database"
                    delete file "{@path}%player%.html"
                    send player title "&a&l." with subtitle "&8Deleting database from you..." for 5 seconds
                    wait 10 tick
                    add %arg-2% to {globalcoins.%player%}
                    send player title "&a&l.." with subtitle "&8Create file of added coins..." for 5 seconds
                    wait 10 tick
                    create file "{@path}%player%.html"
                    send player title "&a&l..." with subtitle "&8Create new database frpm you..." for 5 seconds
                    wait 10 tick
                    wf "%{globalcoins.%player%}%" to "{@path}%player%.html"
                    send player title "&a&l." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    send player title "&a&l.." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    send player title "&a&l..." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    message "{@prefix} &6%arg-2% Global Coins&a was added to your Account!"
                    send player title "&a&l✔" with subtitle "&8Coins added!" for 5 seconds

Spigot: 1.8.8
Plugins: WildSkript, UmbsakaJave7, skUtilities, Skungee, SkStuff, skRayfall, Skript, SkQuerym SkMorkaz. SkExtras, Skellett, SkAction, SharpSk, RandomSk, PiratSK

~ HerrUngelachtHD, Alexander
 
When i reloading this script then come an error ("'%arg-2%' is not an entity type (globalcoins.sk, line 35: add %arg-2% to {globalcoins.%player%}')"). It always worked that way. That's why I'm wondering that it does not work now

Can someone help me please?

Code:
            if arg 1 is "add":
                if arg 2 is set:
                    message "&8Setup/Edit the database"
                    delete file "{@path}%player%.html"
                    send player title "&a&l." with subtitle "&8Deleting database from you..." for 5 seconds
                    wait 10 tick
                    add %arg-2% to {globalcoins.%player%}
                    send player title "&a&l.." with subtitle "&8Create file of added coins..." for 5 seconds
                    wait 10 tick
                    create file "{@path}%player%.html"
                    send player title "&a&l..." with subtitle "&8Create new database frpm you..." for 5 seconds
                    wait 10 tick
                    wf "%{globalcoins.%player%}%" to "{@path}%player%.html"
                    send player title "&a&l." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    send player title "&a&l.." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    send player title "&a&l..." with subtitle "&8Move Coins file in your database..." for 5 seconds
                    wait 1 second
                    message "{@prefix} &6%arg-2% Global Coins&a was added to your Account!"
                    send player title "&a&l✔" with subtitle "&8Coins added!" for 5 seconds

Spigot: 1.8.8
Plugins: WildSkript, UmbsakaJave7, skUtilities, Skungee, SkStuff, skRayfall, Skript, SkQuerym SkMorkaz. SkExtras, Skellett, SkAction, SharpSk, RandomSk, PiratSK

~ HerrUngelachtHD, Alexander
You should only use percentage signs (%) when they're used inside of a string or a variable. Remove the unnecessary percentage signs.
 
Status
Not open for further replies.