__index = 5 setmetatable(a, mt) --print(a.x) --error:attempt to index a number value,如果元表的__index不是方法,當做table處理,所以這邊報錯 ...
確定! 回上一頁