Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --mytable.lua
- local mytable = {}
- mytable.myfunction = function()
- print("ohai")
- end
- mytable.hello = "world"
- mytable.myReturningFunction = function()
- return mytable.hello
- end
- return mytable
- --mytableusage.lua
- local tbl = require("mytable.lua")
- print(tbl.hello)
- print(tbl.myReturningFunction())
- tbl.myfunction()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement