#ScoreboardIdentity became undefined inside for loop?
1 messages · Page 1 of 1 (latest)
inside or after the block?
after
displayName is not a participants property
but that doesn't seem to be the problem anyway
so what did i do wrong?
no idea
fuck
is there like
any other code context
that would be useful
i see var is used and sometimes that can have unexpected overlap when it comes to for loops
you sure the score have participants?
imma use different variable name?
you could also just use let
okay tried it and but still same error
yes
p.displayName.startsWith(evt.source.id)
this doesn't seem right
what do i change?
this won't do, im searching for a fake player
do a loop through the Participants and display the displayName to the log
what do you mean
its based on the entity's actual id, not related to a specific player's xuuid or something so it will work, even for fake players (or any other entity)
never used fake player
so i assumed he is right
but fake player is not an entity therefore doesn't have an id
just try it ...
oh didnt realize gametest called them fake players
hes talking about when you do like
scoreboard players set "some random string" objective 3
(might be out of order but yk what i mean)
so doing .id really wont work here
but anyways thats not related to the error
^
hmm
that code is inside many blocks
itemUseOn
- if block to check item id
- form 1
- form 2
- form 1
i changed it, still receiving same error
???
const test = world.scoreboard.getObjective("revenues").getParticipants()
test.forEach((p) => {
const t = {
id: p.id,
name: p.displayName,
id2: evt.source.id
}
console.warn(JSON.stringify(t, null, 2));
})
use this and send your content log