#scores not loading properly after 1.20
1 messages · Page 1 of 1 (latest)
Please format your code as code-blocks! This makes the text monospaced, and has support for syntax highlighting.
The format looks like this:
for JSON
```json
{
"example": 123
}
```
for JavaScript
```js
console.log("hello world", 123)
```
The character used here is the backtick (U+0060 ` GRAVE ACCENT). This symbol is usually at the top left of your keyboard, occupying the tilde key (~). On mobile, it will be on the second or third page of symbols.
There are 7 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m2[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m2[0m import { rankDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m3[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m3[0m import { clanDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m6[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m6[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m11[0m:[33m40[0m - [31merror[0m[30m TS2339: [0mProperty 'getPlayerScore' does not exist on type 'Scoreboard'.
[7m11[0m const playerScore = scoreboard.getPlayerScore(player, objective);
[7m [0m [31m ~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m19[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m19[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m21[0m:[33m4[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m21[0m }
[7m [0m [31m ~[0m
``````ansi
[36m<repl>.js[0m:[33m22[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m22[0m }
[7m [0m [31m~[0m
There are 11 errors in this [code](#1117540782451208223 message).
Please read the attached file for the result.
There are 11 errors in this [code](#1117540782451208223 message).
Please read the attached file for the result.
There are 7 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m2[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m2[0m import { rankDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m3[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m3[0m import { clanDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m6[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m6[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m12[0m:[33m28[0m - [31merror[0m[30m TS2339: [0mProperty 'getValue' does not exist on type 'number'.
[7m12[0m return playerScore.getValue();
[7m [0m [31m ~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m19[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m19[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m21[0m:[33m4[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m21[0m }
[7m [0m [31m ~[0m
``````ansi
[36m<repl>.js[0m:[33m22[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m22[0m }
[7m [0m [31m~[0m
There are 9 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m6[0m:[33m28[0m - [31merror[0m[30m TS2339: [0mProperty 'getValue' does not exist on type 'number'.
[7m6[0m return playerScore.getValue();
[7m [0m [31m ~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m13[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m13[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m15[0m:[33m4[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m15[0m }
[7m [0m [31m ~[0m
``````ansi
[36m<repl>.js[0m:[33m16[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m16[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m31[0m:[33m100[0m - [31merror[0m[30m TS2304: [0mCannot find name 'rankDefault'.
[7m31[0m let playerRank = player.getTags().find(tag => tag.startsWith("rank:"))?.substring(5) ?? `${rankDefault}`;
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m32[0m:[33m100[0m - [31merror[0m[30m TS2304: [0mCannot find name 'clanDefault'.
[7m32[0m let playerClan = player.getTags().find(tag => tag.startsWith("clan:"))?.substring(5) ?? `${clanDefault}`;
[7m [0m [31m ~~~~~~~~~~~[0m
There are 9 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m38[0m:[33m60[0m - [31merror[0m[30m TS2304: [0mCannot find name 'config'.
[7m38[0m player.onScreenDisplay.setTitle(`\n §r§kii§r ${config.SERVER_NAME} §r§kii§r \n\n §6[ Your Stats ]\n §6Name: §7${player.name}\n §6Money: §7${config.CURRENCY}${metricNumbers(getScore(player, "money"))}\n §6Rank: ${playerRank}\n §6Clan: ${playerClan}\n §6Kill: §7${getScore(player, "kills")}x\n §6Death: §7${getScore(player, "death")}x \n\n §6[ Server Stats ]\n §6Online: §7${getScore(player, "online")} / ${config.MAX_ONLINE}\n §6Location:\n §7${x}, ${y}, ${z}\n\n §6[ Info ]\n Realm Code: §7ULAkPAEUL_M \n §6Discord Code: §7gPz5P72mNA`);
[7m [0m [31m ~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m38[0m:[33m153[0m - [31merror[0m[30m TS2304: [0mCannot find name 'config'.
[7m38[0m player.onScreenDisplay.setTitle(`\n §r§kii§r ${config.SERVER_NAME} §r§kii§r \n\n §6[ Your Stats ]\n §6Name: §7${player.name}\n §6Money: §7${config.CURRENCY}${metricNumbers(getScore(player, "money"))}\n §6Rank: ${playerRank}\n §6Clan: ${playerClan}\n §6Kill: §7${getScore(player, "kills")}x\n §6Death: §7${getScore(player, "death")}x \n\n §6[ Server Stats ]\n §6Online: §7${getScore(player, "online")} / ${config.MAX_ONLINE}\n §6Location:\n §7${x}, ${y}, ${z}\n\n §6[ Info ]\n Realm Code: §7ULAkPAEUL_M \n §6Discord Code: §7gPz5P72mNA`);
[7m [0m [31m ~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m38[0m:[33m418[0m - [31merror[0m[30m TS2304: [0mCannot find name 'config'.
[7m38[0m player.onScreenDisplay.setTitle(`\n §r§kii§r ${config.SERVER_NAME} §r§kii§r \n\n §6[ Your Stats ]\n §6Name: §7${player.name}\n §6Money: §7${config.CURRENCY}${metricNumbers(getScore(player, "money"))}\n §6Rank: ${playerRank}\n §6Clan: ${playerClan}\n §6Kill: §7${getScore(player, "kills")}x\n §6Death: §7${getScore(player, "death")}x \n\n §6[ Server Stats ]\n §6Online: §7${getScore(player, "online")} / ${config.MAX_ONLINE}\n §6Location:\n §7${x}, ${y}, ${z}\n\n §6[ Info ]\n Realm Code: §7ULAkPAEUL_M \n §6Discord Code: §7gPz5P72mNA`);
[7m [0m [31m ~~~~~~[0m
There are 7 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m2[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m2[0m import { rankDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m3[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m3[0m import { clanDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m6[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m6[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m12[0m:[33m28[0m - [31merror[0m[30m TS2339: [0mProperty 'getValue' does not exist on type 'number'.
[7m12[0m return playerScore.getValue();
[7m [0m [31m ~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m19[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m19[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m21[0m:[33m4[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m21[0m }
[7m [0m [31m ~[0m
``````ansi
[36m<repl>.js[0m:[33m22[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m22[0m }
[7m [0m [31m~[0m
There are 11 errors in this [code](#1117540782451208223 message).
Please read the attached file for the result.
There are 9 errors in this [code](#1117540782451208223 message):
[36m<repl>.js[0m:[33m1[0m:[33m24[0m - [31merror[0m[30m TS2305: [0mModule '"@minecraft/server"' has no exported member 'Score'.
[7m1[0m import { world,system, Score } from "@minecraft/server"
[7m [0m [31m ~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m2[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m2[0m import { rankDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m3[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m3[0m import { clanDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m6[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m6[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m11[0m:[33m28[0m - [31merror[0m[30m TS8010: [0mType annotations can only be used in TypeScript files.
[7m11[0m const playerScore: Score = scoreboard.getScore(player, objective);
[7m [0m [31m ~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m19[0m:[33m4[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m19[0m }
[7m [0m [31m ~[0m
``````ansi
[36m<repl>.js[0m:[33m20[0m:[33m1[0m - [31merror[0m[30m TS1128: [0mDeclaration or statement expected.
[7m20[0m }
[7m [0m [31m~[0m
``````ansi
[36m<repl>.js[0m:[33m46[0m:[33m36[0m - [31merror[0m[30m TS2339: [0mProperty 'clearTitle' does not exist on type 'ScreenDisplay'.
[7m46[0m player.onScreenDisplay.clearTitle();
[7m [0m [31m ~~~~~~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m65[0m:[33m68[0m - [31merror[0m[30m TS2339: [0mProperty 'current' does not exist on type 'EntityHealthComponent'.
[7m65[0m let playerHealth = player.getComponent("minecraft:health").current
[7m [0m [31m ~~~~~~~[0m
There are 8 errors in this [code](#1117540782451208223 message):
[36mmessage.js[0m:[33m2[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m2[0m import { rankDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m3[0m:[33m29[0m - [31merror[0m[30m TS2307: [0mCannot find module '../Ranks/configuration.js' or its corresponding type declarations.
[7m3[0m import { clanDefault } from "../Ranks/configuration.js";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m5[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m5[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m29[0m:[33m101[0m - [31merror[0m[30m TS2731: [0mImplicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.
[7m29[0m if (!entity.scoreboardIdentity) entity.runCommand(`scoreboard players set @s "${obj}" ${score}`);
[7m [0m [31m ~~~[0m
``````ansi
[36mmessage.js[0m:[33m62[0m:[33m19[0m - [31merror[0m[30m TS2339: [0mProperty 'scores' does not exist on type 'Player'.
[7m62[0m let { scores, name } = player
[7m [0m [31m ~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m95[0m:[33m16[0m - [31merror[0m[30m TS2339: [0mProperty 'scores' does not exist on type 'Player'.
[7m95[0m player.scores.online += 1;
[7m [0m [31m ~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m100[0m:[33m16[0m - [31merror[0m[30m TS2339: [0mProperty 'scores' does not exist on type 'Entity'.
[7m100[0m deadEntity.scores.death += 1;
[7m [0m [31m ~~~~~~[0m
``````ansi
[36mmessage.js[0m:[33m102[0m:[33m57[0m - [31merror[0m[30m TS2339: [0mProperty 'scores' does not exist on type 'Entity'.
[7m102[0m if (attacker?.typeId == deadEntity.typeId) attacker.scores.kills += 1
[7m [0m [31m ~~~~~~[0m
all gud ig