Lua接口/服务端/PrintStr:修订间差异

来自天龙知识库
跳到导航跳到搜索
雪舞​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
雪舞​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
第4行: 第4行:


<div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">弹出消息框,测试脚本用</div>
<div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">弹出消息框,测试脚本用</div>
<div style="margin:10px 0;padding:10px 12px;border-left:3px solid #9a7940;background:#faf7f0;font-size:13px;color:#5f5136;">本页由服务端绑定源码与随包脚本自动整理:用途、参数位置与返回数量取实现体,<b>未在游戏内执行验证</b>。调用点取自 4244 个服务端脚本中的 17 处真实调用。</div>


== Lua 调用 ==
== Lua 调用 ==
第11行: 第9行:


服务端脚本中共出现 17 处调用,实参个数出现过:1 个(17 处)。
服务端脚本中共出现 17 处调用,实参个数出现过:1 个(17 处)。
实现位于 <code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Misc.h</code> 第 704 行,注册表第 384 行。


== 参数 ==
== 参数 ==
第48行: 第48行:
-- obj/item/guanpiao.lua
-- obj/item/guanpiao.lua
PrintStr("dfgh")</pre>
PrintStr("dfgh")</pre>
<div style="margin-top:20px;padding-top:10px;border-top:1px solid #dbe3e6;color:#657078;font-size:12px;">核对依据:<code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Misc.h</code> 第 704 行,服务端注册表第 384 行。调用格式与返回数量依据当前实现整理;脚本调用点取自 4244 个随包脚本(共 535888 行、命中 85384 处调用),未经运行验证。游戏内效果、边界行为及未注明的业务枚举仍需实测。</div>


</div>
</div>

2026年9月19日 (六) 13:19的版本

首页 · 服务端接口 · 通用与活动 · 调用约定

弹出消息框,测试脚本用

Lua 调用

PrintStr(strText)

服务端脚本中共出现 17 处调用,实参个数出现过:1 个(17 处)。

实现位于 LuaFnTbl_Misc.h 第 704 行,注册表第 384 行。

参数

序号 参数 / 类型 说明
1 strText
string
消息框的提示字符串
脚本中的实参:strText(11 处)、"背包空间不够"、"找不到 杨铁信"

返回值

无返回值。赋值接收时得到 nil;这与返回数字 0 不同。

脚本中的调用

以下是服务端脚本里的真实调用点,按实参形态去重后列出 7 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。

-- event/chuansong/echuansong_dawan_samaerhan.lua
PrintStr("dd")

-- event/festival/SpringFestival07/ShiMen_CaiJi.lua
PrintStr(strText)

-- event/huodong/eShuangyingBoss.lua
PrintStr("Have a Monster in the scene")

-- event/huodong/eShuangyingBoss.lua
PrintStr("There is no Monster in the scene")

-- event/sceneevent/shilin_940.lua
PrintStr("找不到 杨铁信")

-- event/test/etest_0006.lua
PrintStr("背包空间不够")

-- obj/item/guanpiao.lua
PrintStr("dfgh")