#Multiplier Help

1 messages · Page 1 of 1 (latest)

cinder nest
#

So my skript has a multiplier in it that goes up until quadrillions but can anybody help in how to change the 100000 to 1Million or 1M without changing the original variable to a text

thanks for any help

silver bough
#

make a funciton that change the numbers from 1000 to 1k and 10000 to 10k ect.

feral violet
#

this is an example and prob wont work but

#
set {variable} to {varible}/1000```
cinder nest
#

i cant do that

cinder nest
#

thats not even close?

#

thats just deviding the variable

#

spelled wrong

#

and no letter

#

and it changed the original variable

feral violet
#

and then when its saying the variable if its over 999 add K at the end

cinder nest
#

...

#

ok lets listen to this

#

so now if i ask it if its above 1000

#

what does it say?

#

lmao

silver bough
#

found a snippet in skunity idk if it works

function formatNumber(n: number) :: text:
   set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
   loop split {_data} at "|":
       set {_s::*} to split loop-value at ","
       {_n} >= 10 ^ {_s::2} parsed as number
       return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
   return "%{_n}%"
feral violet
#

it will divide it by 1000 and add a K in the message

cinder nest
#

its a text

#

so if i try to use the multi

#

it wont do anything

vale flame
#

mittens i need ur ign

vale flame
#

rq

cinder nest
#

ye i saw thx

vale flame
#

pls

cinder nest
#

il try to dissect it

feral violet
vale flame
#

to whitelist u

#

on my test server

vapid tapir
feral violet
#

why though, why do i need to join it

#

i cant even join rn

#

its my nickname though

vale flame
#

it has examples of functions

#

lemme send u them in dms rq

feral violet