Cambios

Ir a la navegación Ir a la búsqueda
147 bytes añadidos ,  16:22 30 may 2023
sin resumen de edición
Línea 1: Línea 1:  +
--Not adding a dot to 2nd ES number at all now.
 +
--Math.Max(r.Next(1, 11) * 100, price * r.Next(3, 6))
 +
--Scribunto: math.max(x, ...) Returns the max of all arguments
 +
 
local p = {}
 
local p = {}
   Línea 35: Línea 39:  
temp = tostring(mw.language.getContentLanguage():formatNum(lowprice))
 
temp = tostring(mw.language.getContentLanguage():formatNum(lowprice))
 
 
if (temp < 10000) then
+
if (tonunber(temp) < 10000) then
local length = #(tostring(temp))
+
local length = #(temp)
temp2 = string.sub(tostring(temp), -3)
+
temp2 = string.sub(temp, -3)
formattedprice = formattedprice .. string.sub(tostring(temp), 1, (length-3)) .. "." .. temp2
+
formattedprice = formattedprice .. string.sub(temp, 1, (length-3)) .. "." .. temp2
 
else
 
else
 
temp2 = {mw.ustring.gsub(tostring(formattedSum), "%s" , ".")}
 
temp2 = {mw.ustring.gsub(tostring(formattedSum), "%s" , ".")}
106 787

ediciones

Menú de navegación