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.

I get this error cant understand

Discussion in 'Skript' started by Smartman_xd, Apr 25, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. Smartman_xd

    Smartman_xd Member

    Joined:
    Apr 9, 2021
    Messages:
    2
    Likes Received:
    0
    my skript
    Code (Text):
    1. options:
    2.     deny-username-message: &8> &4You can't put your username here&8!
    3.     no-referral-message: &8> &4Ok&8! &4A person didn't tell you about the server&8.
    4.     thank-you-message-1: &8> &aThank you for telling us &2%player%&8!
    5.     thank-you-message-2: &8> &aThank you for inviting &2%player% &ato the server&8! &aYou earn 1 refer token!
    6.     already-answered: &8> &4You already answered this&8!
    7.     referral-1: &8> &aWho told you about the server? Please type /referral (username of who invited you)&8!
    8.     referral-2: &8> &cType /referral none&8, &cif nobody invited you&8.
    9.  
    10. on first join:
    11.     set {referral.%player%} to true
    12.     wait 5 seconds
    13.     message "{@referral-1}"
    14.     message "{@referral-2}"
    15.  
    16. command /referral <offline player>:
    17.     trigger:
    18.         if {referral.%player%} is true:
    19.             if arg 1 is player:
    20.                 message "{@deny-username-message}"
    21.                 stop
    22.             if arg 1 is "none":
    23.                 message "{@no-referral-message}"
    24.                 set {referral.%player%} to false
    25.                 stop
    26.             else:
    27.                 message "{@thank-you-message-1}"
    28.                 add 1 {refertoken.%arg 1%}
    29.                 if arg 1 is online:
    30.                     message "{@thank-you-message-2}" to arg 1
    31.                     set {referral.%player%} to false
    32.         if {referral.%player%} is false:
    33.             message "{@already-answered}"
    34.             stop
    35.  
    36.                                                  
    Error: Cant understand this condition/effect: add 1 {refertoken.%arg-1%} (refer.sk, line 28: add 1 {refertoken.%arg 1%})
     

    Attached Files:

  2. HI46

    HI46 Member

    Joined:
    Apr 25, 2021
    Messages:
    2
    Likes Received:
    0
    Code (Skript):
    1. add 1 to {refertoken.%arg-1%}
     
    #2 HI46, Apr 25, 2021
    Last edited: Apr 28, 2021
Thread Status:
Not open for further replies.

Share This Page

Loading...