![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lua
cn_yaojin
这个作者很懒,什么都没留下…
展开
-
lua string类型 转 number类型
local start = "1"local t = type(start) if t == "string" then --判断是string类型的话,转为number start= tonumber(start) end原创 2018-10-25 17:25:23 · 52333 阅读 · 0 评论 -
lua 文件相互调用
假设 demo1.lua 想调用 demo2.lua,那么需要在demo2.lua中如下设置:local _M = {}function _M.test1() return "hello world"endreturn _M demo1.lua调用:local demo = require("demo2")demo.test1() ...原创 2018-10-25 17:30:13 · 9344 阅读 · 1 评论