I've noticed Blockland does not have number formatting, as far as I know anyway. So I've decided to create a script because I really needed numbers to be formatted. I'm releasing a basic version of the script I've created. I'm sure someone could come up with something better that would support more.
It does not support anything like 10000.00.
Command: FormatNumber(%num, %thousands_sep, %appendedStart);
%thousands_sep is optional
%appendedStart is optional
Example Usage: FormatNumber(900000, ",", "$");
function FormatNumber(%num, %thousands_sep, %appendedStart) {
%num = StripMLControlChars(%num);
%num = strReplace(%num, ",", "");
if(%thousands_sep $= "")
%thousands_sep = ",";
if(strLen(%num) == 4) {
%first = getSubStr(%num, 0, 1);
%last = getSubStr(%num, 1, 3);
return %first @ %thousands_sep @ %last;
}else if(strLen(%num) == 5) {
%first = getSubStr(%num, 0, 2);
%last = getSubStr(%num, 2, 3);
return %first @ %thousands_sep @ %last;
}else if(strLen(%num) == 6) {
%first = getSubStr(%num, 0, 3);
%last = getSubStr(%num, 3, 5);
return %first @ %thousands_sep @ %last;
}else if(strLen(%num) == 7) {
%first = getSubStr(%num, 0, 1);
%middle = getSubStr(%num, 1, 3);
%last = getSubStr(%num, 4, 6);
return %appendedStart @ %first @ %thousands_sep @ %middle @ %thousands_sep @ %last;
}else if(strLen(%num) == 1 || strLen(%num) == 2 || strLen(%num) == 3) {
return %appendedStart @ %num;
} else {
return "Error Formatting Number!";
}
}