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!
I've slightly changed the judgement, because there were a variety of answers and like, only 2 people followed the exact rules .
In first place is @it_twit with the shortest length:
In second place is @Snow-Pyon with the code that got @it_twit first:
In third place is @Sylfare with code that doesn't require any addons but is compact:
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
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!
I've slightly changed the judgement, because there were a variety of answers and like, only 2 people followed the exact rules .
In first place is @it_twit with the shortest length:
Code:
regex replace "(?<=\d)(?=(\d{3})+(?!\d))" with "," in {_integer}
In second place is @Snow-Pyon with the code that got @it_twit first:
Code:
regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "," in {_integer}
In third place is @Sylfare with code that doesn't require any addons but is compact:
Code:
set {_r} to "%{_number}%"
set {_t} to ""
loop round up length of {_r} / 3 times:
set {_l} to the last 3 characters of {_r}
set {_r} to the first length of {_r} - 3 characters of {_r}
if loop-number = 1:
set {_t} to "%{_l}%%{_t}%"
else:
set {_t} to "%{_l}%,%{_t}%"
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