#My scripts that worked in version 1.19.80 stopped working in version 1.20

1 messages · Page 1 of 1 (latest)

bright sparrow
#

I will send images of the scripts

#

Template

#

I can't identify the error... It's been happening since Minecraft 1.20 beta

drowsy arch
#

you can look at changelog there is mayn information vvhat helps you fixing your code

#

#1067535712372654091

#

#1116399323580739684

bright sparrow
#

That's why I'm asking for help, friend

drowsy arch
drowsy arch
#

? formating

upper hedgeBOT
#
Formatting JSON, JS

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.

drowsy arch
#
console.log("hello world", 123) 
bright sparrow
#

MAIN

import * as ui from './ui.js';
import * as mc from '@minecraft/server';
import { system, world } from '@minecraft/server';

system.runInterval(() => {
    for (const player of mc.world.getPlayers()) {
        ui.repeat(player);
    }
}, 5)
drowsy arch
#

thx

#

this file is OK

bright sparrow
#

UI

import * as mc from '@minecraft/server';
import * as consult from './template';
export function repeat(player) {
    player.onScreenDisplay.setTitle(
        `[EP:${parseInt(consult.score(player, "ep") / consult.score(player, "ep_eval") * 100)}]
         [HP:${parseInt(consult.score(player, "hp") / consult.score(player, "hp_eval") * 100)}]`
    );
}
#

TEMPLATE

import * as mc from '@minecraft/server';
export function score(player, objective) {
    try {
        return mc.world.scoreboard.getObjective(objective).getScore(player.scoreboard)
    } catch (e) { return 0; }
}
drowsy arch
#

last one is vvrong is guess

#

change

#

player.scoreboard

#

to

#

player.scoreboardIdentity

bright sparrow
#

Ok