Topic category: Troubleshooting, bugs, and solutions
EDIT: I have confirmed this is a glitch. It only happens in singleplayer or if your are hosting a LAN session any players that try to join will not have the double result issue. I dont know much about code, but I assume that one of the procedures are using the wrong type of code. Possibly meant for a server?
I am unsure if this is a glitch but I have looked into it for all of today and I just cant seem to understand why I am getting two results instead of one:
I have that code set to activate when I rc on a block and I clicked on it once and this is what I got in chat:
This is my dice rolling code (completely separate from the above code) In this use case I attempted to have it set up to say {Player}'s Dice roll then have two random numbers between 1-6 listed in chat.
This is what happens when I test it:
(version 2020.4)
Did you know that it generates a Number from 0 to 1,
so you need to do:
The rounded Number (0-18) +1 because "0" is not in the script. I don't know if you mean that.
Same with Dice, it generates a number between 0 and 6, not 1 and 6, I don't really know if you mean that.
And you don't need the "Format Number as #". Just use the round up thing without format number.
thank you but I will do that but i am referring to the double output in chat. I only have the dice setup to give me one number but it gives me two and same with the other.
also the format number as is the only way for my to get it displayed to chat for some reason
Random(0,1) is determined randomly for every time you use it, it's known to cause desyncs like this.
You might be able to go around this by having the dice result be determined by the internal server instead of the client.
Also, a random number between 1 and 6 could be Random(0,5)+1 (that's what I tend to do), with a round() block
Thank you for your comment. I have it currently set up with Random(0,5)+1 with round
How would you set it up for the internal server?