#/give written_book inconsistencies

1 messages · Page 1 of 1 (latest)

burnt locust
#

Version: vanilla 1.19

I want to give players a written book that displays their score of some resources like the xp they have

Since you can't use @s or selectors like that in written books if the player is not an operator, what I did was use fake player name in scoreboard that can be displayed, for example I'm the function to give the book /scoreboard players operation xp Display = @s XP and then /give @s written books using the xp Display selector.

The problem is that players get other player's scores in their written book. I debugged it using also a tellraw to display the score and that works fine, but the written book just shows another player's score

wicked urchinBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1740832197:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

warm grove
#

The player not being an op does 't prevent the book from reading the player score.

#

You should be able to use them.

#

The Player only has to be op to use click commands that require op permissions.

burnt locust
burnt locust
burnt locust
feral kite
#

hm, it's not possible

get other player's scores

#

Can you demonstrate this? @burnt locust

burnt locust
#

yes let me make a video or something

burnt locust
burnt locust
# burnt locust

there you can see that there is a tick that executes this function as any player that does not have a written book, and i got a different stat as the chat said

#

in the tellraw i displayed the exact same scores in the book, but in the book it displayed another player's

feral kite
#

what is the server core?

feral kite
burnt locust
feral kite
#

You have several players

burnt locust
burnt locust
#

like the tick.json?

burnt locust
# burnt locust

i made all that random selection and limit to try if that made it not get another player's scores but didnt work

#

that function is permanently scheduled on one tick

feral kite
burnt locust
#

using any selectors like @e @p @a @s does that

#

only way is to use fixed names

#

like _Kirtash

feral kite
#

I forgot to turn off the operator. It doesn't work, you're right.

#

in this case, macros are needed, which are not available on version 1.19.

#

why are you on such an old version?

burnt locust
#

but why does the book display other player's scores?

#

is this a bug in minecraft?

burnt locust
feral kite
feral kite
#

this is an example of logic, there will be more text on the commands;

macro = @s <score>
{"text":"$(macro)"}

instead
{"score":{"name":"@s","objective":"<score>"}}

burnt locust
#

i dont really understand

#

is this a type of function opr predictate?

#

btw porting to what version should i?

feral kite
#

just latest

#

1.21.4

#

the higher the version, the more new features it has. But there are also a lot of things that need to be changed compared to the old versions.

feral kite
burnt locust
#

becouse of fps and allat

feral kite
#

the new versions are more optimized than the old ones

burnt locust
#

do command change much?

#

my datapack is kinda big

#

and i have custom model data, songs

feral kite
# burnt locust and i have custom model data, songs

yes, they have changed a lot compared to 1.19, even custom model data. But it's better to start updating now than to finish and forget about it on the old version. You will also learn new functions during this time.

wicked urchinBOT
#
Question Closed

Your question, #1345364934963236885 (/give written_book inconsistencies), was resolved!

Original Message

#1345364934963236885 message

Duration open

1d3h52m

wicked urchinBOT
#
Closed for inactivity

This question has been inactive for some time, so it's going to be closed for inactivity. If you still need it, please disregard this message.