Lua接口/服务端/GetQuestionsRecord:修订间差异
来自天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| 第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
<div class="lua-reference | <div class="lua-reference"> | ||
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/任务与对话|任务与对话]] · [[Lua接口/服务端调用约定|调用约定]] | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/任务与对话|任务与对话]] · [[Lua接口/服务端调用约定|调用约定]] | ||
<div | <div class="lua-lead lua-rule">读取题库信息</div> | ||
== Lua 调用 == | == Lua 调用 == | ||
<pre | <pre>GetQuestionsRecord(nIndex)</pre> | ||
服务端脚本中共出现 14 处调用,实参个数出现过:1 个(14 处)。 | 服务端脚本中共出现 14 处调用,实参个数出现过:1 个(14 处)。 | ||
实现位于 <code | 实现位于 <code>LuaFnTbl_Mission.h</code> 第 2919 行,注册表第 183 行。 | ||
== 参数 == | == 参数 == | ||
{| class="wikitable | {| class="wikitable" | ||
! scope="col" | ! scope="col" class="lua-w11" | 序号 | ||
! scope="col" | ! scope="col" class="lua-w36" | 参数 / 类型 | ||
! scope="col | ! scope="col" | 说明 | ||
|- | |- | ||
| 1 | |||
| <code>nIndex</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 问题号,整数<br /><span class="lua-muted">脚本中的实参:<code>Question</code>(6 处)、<code>wenti</code>(6 处)、<code>nPoemIndex</code></span> | |||
|} | |} | ||
== 返回值 == | == 返回值 == | ||
返回 14 个值。返回类型包括 <code | 返回 14 个值。返回类型包括 <code>string</code>、<code>number</code>。明确的固定返回组合包括 <code>"", "", "", "", "", "", "", 0, 0, 0, 0, 0, 0, ""</code>。 | ||
== 脚本中的调用 == | == 脚本中的调用 == | ||
以下是服务端脚本里的真实调用点,按实参形态去重后列出 4 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。 | 以下是服务端脚本里的真实调用点,按实参形态去重后列出 4 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。 | ||
<pre | <pre>-- event/city/ecity_0301poemcomplete.lua | ||
GetQuestionsRecord(nPoemIndex) | GetQuestionsRecord(nPoemIndex) | ||
| 第41行: | 第41行: | ||
== 注意事项 == | == 注意事项 == | ||
* 实现体在该分支无条件断言(<code | * 实现体在该分支无条件断言(<code>StringTable_GetText(167)</code>)。 | ||
</div> | </div> | ||
2026年9月19日 (六) 16:54的版本
读取题库信息
Lua 调用
GetQuestionsRecord(nIndex)
服务端脚本中共出现 14 处调用,实参个数出现过:1 个(14 处)。
实现位于 LuaFnTbl_Mission.h 第 2919 行,注册表第 183 行。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | nIndexnumber
|
问题号,整数 脚本中的实参: Question(6 处)、wenti(6 处)、nPoemIndex
|
返回值
返回 14 个值。返回类型包括 string、number。明确的固定返回组合包括 "", "", "", "", "", "", "", 0, 0, 0, 0, 0, 0, ""。
脚本中的调用
以下是服务端脚本里的真实调用点,按实参形态去重后列出 4 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
-- event/city/ecity_0301poemcomplete.lua GetQuestionsRecord(nPoemIndex) -- event/festival/christmas07/quiz_DaoJiShiDaTi.lua GetQuestionsRecord(wenti) -- event/festival/christmas07/quiz_DaoJiShiDaTi.lua GetQuestionsRecord(Question) -- event/misc/couplequestion.lua GetQuestionsRecord(question)
注意事项
- 实现体在该分支无条件断言(
StringTable_GetText(167))。