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.

My string is showing as "<none>"

Discussion in 'Skript' started by ReaperProgrammer, Feb 18, 2021.

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

    Joined:
    Jan 13, 2021
    Messages:
    3
    Likes Received:
    0
    So I was making something to help the admins on the server I'm on and when everything works but the "suslist" command it shows up as <none> please help.



    Code (Text):
    1. command suslist:
    2.     trigger:
    3.         message "&6&lMagma&4&lLands &7&l>> &7Sus list: "
    4.         message "%{_suslist::*}%"
    5.  
    6. command susadd <offline player>:
    7.     trigger:
    8.         add arg 1 to {_suslist::%arg 1%}
    9.         message "&6&lMagma&4&lLands &7&l>> &7Added %arg 1% &7to suslist"
    10.  
    11. command susremove <offline player>:
    12.     permission: op
    13.     trigger:
    14.         delete {_suslist::%arg 1%}
    15.         message "&6&lMagma&4&lLands &7&l>> &7Removed %arg 1%&7 from suslist"
     
    #1 ReaperProgrammer, Feb 18, 2021
    Last edited: Feb 20, 2021
  2. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    208
    Likes Received:
    21
    remove the underscore in the variable name... and also, use [ code ]!
    Code (Text):
    1. {suslist::%arg-1%}
     
  3. ReaperProgrammer

    Joined:
    Jan 13, 2021
    Messages:
    3
    Likes Received:
    0
    its still showing up as "<none>" thank you for replying tho.
     
  4. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    208
    Likes Received:
    21
    found the wrong part
    Code (Text):
    1. add arg 1 to {suslist::*}
     
  5. Time4Games

    Time4Games Active Member

    Joined:
    Jul 25, 2020
    Messages:
    203
    Likes Received:
    4
    an underscore before the variable name makes it a local variable. You should read an explanation about the difference
     
Thread Status:
Not open for further replies.

Share This Page

Loading...