[英]call function in lua from different lua class
I have a function 我有一个功能
function f1(msg) return value end
in Lua file A.lua, how i can call this function or the return result of this function from a B.lua Thank you Jp 在Lua文件A.lua中,我如何从B.lua调用此函数或该函数的返回结果谢谢Jp
You use the require function ( http://www.lua.org/pil/8.1.html ) 您使用require函数( http://www.lua.org/pil/8.1.html )
require("A")
f1("my message")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.