మాడ్యూల్:Roman: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి Changed protection level of Module:Roman: Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
try again to avoid pretending everything's fine when something is really wrong, this time without causing an error on 2016
పంక్తి 28:
if args[1] == nil then return end
local num = tonumber(args[1])
if type(not num) ~or num < 0 or num == "number"math.huge then
error('Invalid input,number not' recognized.. as a number'args[1], 2)
elseif num < 0 or num == math.huge then
error(string.format(args[1] .. ' is out of range'), 2)
return
elseif num == 0 then
return 'N'
Line 121 ⟶ 118:
if args == nil or args == {} then return end
-- Given mathematical expression, simplify to a number
if type(args[1]) == 'string' then
local success, resultargs[1] = pcall(mw.ext.ParserFunctions.expr, (args[1])
if success then
args[1] = result
end -- else, pass to _main routine and try to let Lua's tonumber handle it
end
return _main(args)
"https://te.wikipedia.org/wiki/మాడ్యూల్:Roman" నుండి వెలికితీశారు