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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[#1] Winners of Skript Challenge - Number Format

Discussion in 'Skript Challenge' started by BaeFell, Feb 6, 2017.

  1. BaeFell

    BaeFell I'm Poppy
    Admin

    Joined:
    Nov 27, 2016
    Messages:
    342
    Likes Received:
    202
    Hi everyone,

    After remembering it's Monday and that I hadn't posted the winners of the first Skript Challenge, I've just done it now. Woo! :emoji_grinning:

    I've slightly changed the judgement, because there were a variety of answers and like, only 2 people followed the exact rules :emoji_rolling_eyes:.

    In first place is @it_twit with the shortest length:
    Code (Text):
    1.  
    2. regex replace "(?<=\d)(?=(\d{3})+(?!\d))" with "," in {_integer}
    3.  
    In second place is @Snow-Pyon with the code that got @it_twit first:
    Code (Text):
    1.  
    2. regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "," in {_integer}
    3.  
    In third place is @Sylfare with code that doesn't require any addons but is compact:
    Code (Text):
    1.  
    2. set {_r} to "%{_number}%"
    3. set {_t} to ""
    4. loop round up length of {_r} / 3 times:
    5.     set {_l} to the last 3 characters of {_r}
    6.     set {_r} to the first length of {_r} - 3 characters of {_r}
    7.     if loop-number = 1:
    8.         set {_t} to "%{_l}%%{_t}%"
    9.     else:
    10.         set {_t} to "%{_l}%,%{_t}%"
    11.  
    There is currently no prizes, but @xXAndrew28Xx might have a prize, apparently. I'm looking at getting some sort of medal system or something to reward people.

    Hope you all enjoyed this Skript challenge! If you have an idea for the next one, PM me and I'll see what I can do.

    Thanks,
    BaeFell
     
    • Informative Informative x 2
    • Like Like x 1
    • Agree Agree x 1
  2. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,410
    Likes Received:
    88
    You forgot me for the longest :emoji_slight_smile:
     
  3. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,410
    Likes Received:
    88
    YOU forgot me for the middle-ist... :emoji_wink:
     
    • Creative Creative x 2
  4. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,410
    Likes Received:
    88
    YOU forgot what English is.
     
    • Winner Winner x 3
    • Like Like x 1
  5. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,410
    Likes Received:
    88
    I look forward to the next challenge so I can participate :emoji_slight_smile:
     
  6. ShaneBee

    Supporter +

    Joined:
    Sep 7, 2017
    Messages:
    1,410
    Likes Received:
    88
    You forgot me for being THE Guy that missed this challenge
     
Loading...