尝试索引本地“ ttlobj”(nil值)

时间:2019-12-30 11:23:45

标签: lua

p .  pginfo = function ( frame )
     local title = tostring(frame.args.title) or ""
     local ttlobj = mw.title.new( title )
     local txt = ttlobj.text
     if ttlobj.exists then
       if ttlobj .isRedirect then
         txt = txt .. " exists and is a redirect"
       else
         txt = txt .. " exists and is not a redirect"
       end
     else
       txt = txt .. " does not exist"
     end
     return txt
end

{{## invoke:Sandbox / Shreyansh Saboo | pginfo | title =}} 我遇到错误如何解决错误? 请帮我解决这个问题。

0 个答案:

没有答案