RegEx outputs <none>

  • 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.

Great_Guy96

New Member
Mar 13, 2019
7
4
3
Skript Version (do not put latest): Idk, it says it's a custom one (I'm using Minehut, so I'm guessing it's the latest version)
Skript Author: Bensku
Minecraft Version: 1.15
Code:
Code:
function formatNum(i: number) :: text:
 set {_n} to regex replace "(\d{1,2}?)((?:\d{3})+)$" with group "$1,$2" in {_i}
 return regex replace all "(\d{3})(?=\d)" with group "$1," in {_n}
Errors on reload:
None
I'm using TuSKe and SkQuery
The problem is that whatever number I input, it returned "<none>"
(Also just so you know, what I am trying to do is to format numbers nicely)
 
Last edited:
Status
Not open for further replies.