UID577116性别保密经验 EP铁粒 粒回帖0主题精华在线时间 小时注册时间2022-8-12最后登录1970-1-1
| 10铁粒 function examine() {
if (hasitem(itemList[0], getMain()) && !data.fristly) {
world.sendMessage("§e欢迎使用本模组");
world.sendMessage("§e模组版本号:0.0.2-bate");
world.sendMessage("§e当前时间:" + formatDate(new Date()));
world.sendMessage("§e游戏版本:1.19.70");
world.sendMessage("§e玩家维度:" + getMain()
.dimension.id);
world.sendMessage("§e是否置顶:" + eventTrigger(getMain(), "SwordMiss"));
setItemLore(itemList[0], ["拥有者:" + getMain()
.name, "SilvercideMod"], getMain());
try {
import {
Test
}
from "./Test.ts";
} catch {
world.sendMessage("接口加载失败");
}
moduleSetting.defenceSetting.forbiddenTeleport = true;
moduleSetting.defenceSetting.forbiddenChangeHealth = true;
moduleSetting.defenceSetting.forbiddenDisarmMode.turnon = true;
moduleSetting.defenceSetting.forbiddenDisarmMode.mode = "Interval";
moduleSetting.defenceSetting.forbiddenChangeMode = true;
moduleSetting.otherSetting.particleSpawn = true;
moduleSetting.otherSetting.dynamicName = true;
moduleSetting.otherSetting.timestopPlayup = true;
data.fristly = true;
getMain()
.runCommandAsync("scoreboard players add @a timestop 0");
}
}
报错我少一个括号。
|
最佳答案查看完整内容 您的代码中缺少了一个右括号 `)`。需要仔细检查代码结构并确保所有的块正确地关闭。在您的代码中,可能是 `getMain().dimension.id` 这一行之后的括号不匹配导致的。以下是修正后的代码:
```javascript
function examine() {
if (hasitem(itemList[0], getMain()) && !data.fristly) {
world.sendMessage("§e欢迎使用本模组");
world.sendMessage("§e模组版本号:0.0.2-bate");
world.sendMessage ... |