'(' expected near '.'

报错内容
.\module.lua:10: '(' expected near '.'
stack traceback:
        [C]: ?
        [C]: in function 'require'
        .\testModule.lua:2: in main chunk
        [C]: ?

error:在定义私有的函数的时候不需要写module

错:
local function module.func1()
  print("这是私有函数")
end
正确的:
local function func1()
  print("这是私有函数")
end
posted @ 2022-07-25 20:24  再努力一些  阅读(718)  评论(0)    收藏  举报