#how to store scoreboards and command outputs to a variable
14 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Command outputs are always 1 or 0 to indicate if it’s successful or not, is that what you want to save?
Commands have both a boolean 'success' value and a 'result' value which I assume is what they want. See the /execute store command
ik about execute store
but execute store stores to a scoreboar
i want to turn that scoreboard into a variable
Yes, sorry, I was responding to Lexxie
If I were you I would just not use scoreboards and try to rewrite it just in code, if that's possible at all.
yeah im much more familiar with commands than all this js stuff lol
I've worked a lot with commands, and code is a lot more powerful and easier in the end. You don't have to faff around the same you do with commands. Only tradeoff is you might have to hunt for methods to call
So you can access the scoreboard with server.scoreboard
I'm struggling to figure out exactly what methods gets you a specific score though
Okay I think you want server.scoreboard.getPlayerScores('player_name').ObjectiveName
Alternatively, server.scoreboard.getPlayerScores('player_name')[server.scoreboard.getObjective('objective_name')]
And then you might need to call .getScore() on that to get the numeric value
ok
@vale cloud Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!