NightDev Community Forums

Making a Feet<>CM's converter

I want to make a converter for Feet to CM and one for CM to Feet (For human heights)
(By using !feet 10 and you’ll get the anwser 304,8 CM) (And ofcourse !cm 304,8 and get the answer 10 Feet)

Any tips or tricks to achieve my goal?!

Hiya, something like this:

!commands add !cm $(eval var x = parseFloat(`$(querystring)`) * 0.032808; isNaN(x) ? 'Not a number' : x.toFixed(2) + 'ft';)

!commands add !feet $(eval var x = parseFloat(`$(querystring)`) / 0.032808; isNaN(x) ? 'Not a number' : x.toFixed(2) + 'cm';)

1 Like

Yeah that worked! Thanks so much for your help!