Lua接口/服务端/LuaFnGetCopyScene HumanCount:修订间差异
来自雪舞天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| 第26行: | 第26行: | ||
返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>0</code>。 | 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>0</code>。 | ||
== | == 调用示例 == | ||
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序: | |||
<pre>-- event/autobattle.lua | <pre>-- event/autobattle.lua | ||
LuaFnGetCopyScene_HumanCount(sceneId) | LuaFnGetCopyScene_HumanCount(sceneId) | ||
-- event/fuben/efuben_shaxing.lua | -- event/fuben/efuben_shaxing.lua | ||
LuaFnGetCopyScene_HumanCount(s)</pre> | LuaFnGetCopyScene_HumanCount(s)</pre> | ||
</div> | </div> | ||
2026年10月27日 (二) 12:36的最新版本
返回当前场景里面的玩家数量
Lua 调用
LuaFnGetCopyScene_HumanCount(sceneId)
服务端脚本中共出现 310 处调用,实参个数出现过:1 个(310 处)。
实现位于 LuaFnTbl_Scene.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(309 处)、s
|
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 0。
调用示例
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:
-- event/autobattle.lua LuaFnGetCopyScene_HumanCount(sceneId) -- event/fuben/efuben_shaxing.lua LuaFnGetCopyScene_HumanCount(s)