Solved Removing an element from a list variable not working properly

  • 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 our Wiki for downloads and any other information about Skript!

xWires

Member
Aug 15, 2023
39
4
8
When I remove an element from a list variable, instead of deleting the element, it is just set to <none>, so if you remove the first element of a list with
Code:
delete {testlist::1}
and use this code to look at the list of variables:
Code:
loop {testlist::*}:
    send "%loop-index%. ""%loop-value%"""

it will start at "2."

1695146104245.png
 
When I remove an element from a list variable, instead of deleting the element, it is just set to <none>, so if you remove the first element of a list with
Code:
delete {testlist::1}
and use this code to look at the list of variables:
Code:
loop {testlist::*}:
    send "%loop-index%. ""%loop-value%"""

it will start at "2."

View attachment 7860
Yes, this is how skript works.

If you don't like this, simply:

Code:
loop {test::*}:
  set loop-index to (loop-index - 1)