#Error: Failed to resolve identity for 'PinhoPlays' at <anonymous>
1 messages · Page 1 of 1 (latest)
hello! help me?
system.runInterval(() => {
for (const entity of ovw.getPlayers()) {
const familiaObjective = world.scoreboard.getObjective("family") ?? world.scoreboard.addObjective("family", "familyObj");
const familiaScore = familiaObjective.getScore(entity) ?? familiaObjective.setScore(entity, 0);
}
});
Maybe like that?
wait, it seems wrong
oh i see the problem
overworld ig, he must have used something like ovw = world or smth
const ovw = world.getDimension('overworld')
ye
@floral rivet
const ovw = world.getDimension('overworld')
system.runInterval(() => {
for (const entity of ovw.getPlayers()) {
const familia = world.scoreboard.getObjective("family").getScore(entity);
}}
)
i think you were just missing a )
I fixed this in my code, but why did that error happen then?
but nvm, if this fixes it thats great
you didnt
you did
}
})
you just changed "var" to "const"
no?
you were missing a )
and var didnt make sense
so i changed the variable declaration to const anyway
ye
wait now I'm confused, I think I closed everything here, right? 😭
no this is right
that one you sent and deleted wasnt
@lapis summit It was just a typo when sending this post, the problem still occurs
ah
yeah i was afraid of that
@floral rivet So test my code just to see, but I'm not sure if it will fix it
players who have no score make the mistake run
I added a check for this
Its a bug where you have to give the player a score
yeah
okay
i assumed you had already added the score
if you just have an objective added and no score, it wont work
ye, to be detected the player must have a value
but I want some players to not have the score
then set theirs to 0
not even 0?
no
🕊️
then check if its undefined or smth
but I still think it might not work
Set a random score to 0 on them
like fix_score to 0 or something