#How do i save objects in the scoreboard database?
1 messages · Page 1 of 1 (latest)
please guys
Arent scores supposed to be a number type
You can't get the string or you can't save the string in the scorebpard?
when adding scores using api,it has to be number type
convert it like:
let score = "60"
world.scoreboard.getObjective("obj").addScore(player, Number(score))
That's true, you can save strings using dynamic properties though.
i dont exactly get what this is about sorry
Objects don't consist of a single value
ye i agree,the point of that is the Number()
calling the value inside the object is like this
score["xp"]
The scoreboard would only work if all your Object's properties were numbers or if you assigned a number combination to the values
Idk if it is trying to save the values of keys inside the object to scoreboard,because it has to do it manually per objective