我正在开发一款龙与地下城应用程序,该应用程序最终将显示来自 D&D 书籍的信息。所以我试图从数据集中显示拼写信息。我尝试使用 readRecords 和 updateScreen 并在屏幕上显示“未定义”
我非常感谢任何有用的提示。 https://studio.code.org/projects/applab/VKNZ6xoJsy1ahETdh4R23_-Fs-JI3aF714hsoJqi3qg
我正在开发一款龙与地下城应用程序,该应用程序最终将显示来自 D&D 书籍的信息。所以我试图从数据集中显示拼写信息。我尝试使用 readRecords 和 updateScreen 并在屏幕上显示“未定义”
我非常感谢任何有用的提示。 https://studio.code.org/projects/applab/VKNZ6xoJsy1ahETdh4R23_-Fs-JI3aF714hsoJqi3qg
您需要updateScreen(spellOptions, spellTime);
从第 87 行移动到第readRecords()
84 行的块中。您还需要设置spellTime
为records[0].time
.
下面是第 84 到 87 行的代码:
readRecords("Spells", {name: spellOptions}, function(records) {
spellTime = records[0].spellTime;
updateScreen(spellOptions, spellTime);
});