MA2 Lua 函数库

  1. 主页
  2. 文档
  3. MA2 Lua 函数库
  4. gma.echo() 【输出显示函数】

gma.echo() 【输出显示函数】

函数名:输出显示函数
调 用:gma.echo(all kind of values)
参 数:字符串、数字、或变量
返回值:
结 果:在控台的 System monitor 中输出显示内容
备 注:用来调试程序非常有用

例子:

  • 在控台的 System monitor 中打出文字“Hello World!”
function Start()
    gma.echo("Hello World!")
end
return Start;
  • 在控台的 System monitor 中打出数字“1”
function Start()
    gma.echo(1)
end
return Start;
  • 在控台的 System monitor 中输出“my name is Tom”
function Start()
    name = "Tom"
    gma.echo('my name is '..name)
end
return Start;
标签
这篇文章对您有用吗?

发表回复

您的电子邮箱地址不会被公开。