【发布时间】:2018-09-11 01:24:55
【问题描述】:
我有这个代码:
function test()
function awesome()
print("im awesome!")
end
function notawesome()
print("im not awesome.")
end
function notevenawesome()
print("im not even awesome...")
end
end
test().notawesome()
当我运行它时,控制台会打印
15: 尝试索引一个 nil 值
我想做的是在函数test()中调用函数notawesome(),我该怎么做?
【问题讨论】:
标签: function lua nested-function