Hello, I have a command which when putting a number it multiplies it with another number, the problem is that when it solves the operation all the decimals come out, my question is, how could I reduce the decimals to 2? the command is as follows:
$(user) mide $(eval $(touser)*(1/1.51)) Reis de altura
The command is for convert certain units given to another unit system, I am new to creating commands so it has several errors. For example, if I put some number it will operate it (with all the decimals, problem # 1), but if I put only the command it will name the user who put the command together with the accompanying text “Reis de altura” (problem # 2)
Mainly I would like to fix the problem of decimals so that it shows the result with 2 decimals, but I would also like to solve problem # 2 by putting a condition that if the characters given are not numbers, put some text that explains how to use the command. If anyone know how to solve problem # 1 or both would greatly appreciate it