Solved Change the index of an element

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

Status
Not open for further replies.

PatoFrango

Active Member
Jul 12, 2017
240
14
18
Hi,

What would I have to do to change the index of an array element?

Example:
code_language.skript:
loop {channellog.%{currentchannel.%player's uuid%}%::*}:
    set index of {channellog.%{currentchannel.%player's uuid%}%::%loop-index%} to (loop-index - 1)

EDIT: Nevermind. I'm dumb.
SOLUTION: You can't change the index. If you're looking to reorder an array, like put an element into another position, you simply edit the existing element that has that new position to the element that you wanted to move.
 
Last edited:
Status
Not open for further replies.