Jonas^ Posted June 9, 2018 Share Posted June 9, 2018 (edited) Error: rANKSYSTEM:CLIENT.lua:8 bad argument #1 to 'format' [number expected, got nill ) return tonumber(("%."..decimals.."f"):format(number)) Esse erro é causado quando tem alguns jogadores ONLINE sozinho não acontece ! Toda a função do erro: --/-- RATIO DIMINUIÇÃO DAS CASAS 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 Edited June 9, 2018 by OverKILL Link to comment
DNL291 Posted June 9, 2018 Share Posted June 9, 2018 Talvez isso corrija a mensagem no debug: function math.round(number, decimals, method) if number and type(number) == "number" then 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 return 0 end 1 Link to comment
Jonas^ Posted June 9, 2018 Author Share Posted June 9, 2018 4 minutes ago, DNL291 said: Talvez isso corrija a mensagem no debug: function math.round(number, decimals, method) if number and type(number) == "number" then 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 return 0 end Obrigado em breve irei testar! a DNL pode ver privado por favor? quero uma ajuda mas não quero divulgar o código publicamente ! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now