You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2023. It is now read-only.
Files that export a singular Class type, similar to ES modules default export, will use CamelCase.lua.
Files that export a regular table, similar to ES modules named exports, will use camelCase.lua.
Files should not execute code within the root-level that will affect external runtime environment or behavior during the course of inclusion. The exception is made for files named bt-init.lua.
Wrong
-- module.lualocalexports= {}
-- this chunk is okay because it only changes internal varslocalnames= {}
for...donames[#names+1] =...end-- this chunk is NOT okay because it touches external varstfm.exec.chatMessage("test")
_G.print=nilreturnexports
Correct
-- module.lualocalexports= {}
-- this chunk is also okay because it does not touch external vars in the course of inclusionexports.btInit=function ()
tfm.exec.chatMessage("test")
_G.print=nilendreturnexports
-- bt-init.lualocalmodule=require("module")
-- allow touching external vars in the course of inclusion for bt-init.luamodule.btInit()
_G.hello=0