Bubble Sorting?

  • 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 community!

    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.

yawyann

Member
Sep 28, 2020
3
0
1
Hi someone on Skunity discord told me to Bubble Sort but I never knew how to do it and I was wondering if someone can help me?
Code:
        # Original
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 90
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 50
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 60
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 70
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 20

        # What I want to turn it into
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 90
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 70
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 60
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 50
        {crates::created_crates::%{_crate_id}%::rewards::%{_reward_id}%::chance} = 20

Skript Ver: 2.5-beta4

Skript Addons: MorkazSk, skBee, Skellet, skRayFall, skript-holo, skript-placeholders, TuSKe
 
Status
Not open for further replies.