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.

Solved Add variables to variables

Discussion in 'Skript' started by Ronnoc2w, Oct 1, 2019.

Thread Status:
Not open for further replies.
  1. Ronnoc2w

    Ronnoc2w Member

    Joined:
    Feb 20, 2019
    Messages:
    15
    Likes Received:
    0
    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 (Text):
    1. command /eco [<text>] [<text>] [<text>]:
    2.     trigger:
    3.         if player has permission "tokenapi.eco" or "tokenapi.*":
    4.             if arg-1 is set:
    5.                 if arg-2 is set:
    6.                     if arg-3 is set:
    7.                         set {_add.%player%} to arg-3
    8.                         wait a tick
    9.                         add {_add.%player%} to {tokens.%arg-2%} #Here is my problem
    10.                         send "{@prefix} &7Dir wurden &e%arg-3% &7Tokens überwiesen."
    11.                         delete {_add.%player%}
    12.             else:
    13.                 send "Eroor 1"
    Thanks a lot
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...