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 Relocation list variable

Discussion in 'Skript' started by Scan, Jul 15, 2021.

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

    Scan Member

    Joined:
    Feb 20, 2021
    Messages:
    10
    Likes Received:
    1
    Code (Text):
    1. command /test:
    2.     trigger:
    3.         loop 4 times:
    4.             add "test" to {a::*}
    5.         subtract "test" from {a::*}
    6.         message "%{a::*}%"
    7.         message "%{a::1}%"
    (The problem I want to solve is in other skript and this is an arbitrary syntax for explanatory purposes.)

    It works well, but like under picture, {a::*} doesn't have first element, but has second, third, fourth element.
    upload_2021-7-15_12-20-51.png

    I want these elements to be moved forward
     
  2. Best Answer:
    Post #2 by rustedst, Jul 15, 2021
  3. rustedst

    rustedst Active Member

    Joined:
    Apr 24, 2020
    Messages:
    97
    Likes Received:
    4
    I suppose you can loop {a::*} and create a new list from that.

    Code (Text):
    1. loop {a::*}:
    2.     add loop-value to {b::*}
     
    • Like Like x 1
  4. Scan

    Scan Member

    Joined:
    Feb 20, 2021
    Messages:
    10
    Likes Received:
    1
    I'll try it. Thanks a lot :emoji_slight_smile:
     
    • Like Like x 1
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Hey, I marked the best solution! You can mark the best answer to give the user a small thank you and additionally this will be displayed at the top which helps others to find the best solution directly.
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...