Solved Add variables to variables

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

Ronnoc2w

Member
Feb 20, 2019
15
0
0
Germany
shop.skyplots.de
Hello guys I wanted to make a token system but I cannot add a custom number to a variable :/

Here is my code:
(Problem in line 9)
Code:
command /eco [<text>] [<text>] [<text>]:
    trigger:
        if player has permission "tokenapi.eco" or "tokenapi.*":
            if arg-1 is set:
                if arg-2 is set:
                    if arg-3 is set:
                        set {_add.%player%} to arg-3
                        wait a tick
                        add {_add.%player%} to {tokens.%arg-2%} #Here is my problem
                        send "{@prefix} &7Dir wurden &e%arg-3% &7Tokens überwiesen."
                        delete {_add.%player%}
            else:
                send "Eroor 1"

Thanks a lot
 
Why are you creating a variable from arg-3, then adding it to a variable, then deleting it?
You're overdoing it.
Also, arg-3 is a text, you can only add text to a list
 
Status
Not open for further replies.