Atouk Posted August 8, 2013 Share Posted August 8, 2013 Hola tengo un problema que me da un error: WARNING: Loading script failed: ')' expected near':' Script: function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if method == "ceil" or method == "floor" then return math[method](number * factor) / factor else return tonumber("%." .. decimals .. "f":format(number)) end end Link to comment
Sensacion Posted August 8, 2013 Share Posted August 8, 2013 function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end Link to comment
Atouk Posted August 8, 2013 Author Share Posted August 8, 2013 Persona mas grosa no hay, me salvaste.... GRACIAS Link to comment
Recommended Posts