模块:换行处理:修订间差异
来自Gal中文百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
local p = {} | local p = {} | ||
function p.text( frame ) | function p.text(frame) | ||
local args = frame.args | local args = frame.args | ||
return 'Hello, world!'.. | local variable = args['变量'] or '' | ||
-- 检查参数是否为空 | |||
if variable then | |||
return 'Hello, world!\n' .. variable | |||
else | |||
return 'Hello, world!' | |||
end | |||
end | end | ||
return p | return p | ||
2024年4月3日 (三) 09:30的版本
Hello, world! 242 55 24 脚本错误:函数“img”不存在。
local p = {}
function p.text(frame)
local args = frame.args
local variable = args['变量'] or ''
-- 检查参数是否为空
if variable then
return 'Hello, world!\n' .. variable
else
return 'Hello, world!'
end
end
return p