Need help with random number generator command

I wrote a nightbot command from the information i could find, it should be a random number generator in between 200 and 278, but for some reason when i use the command in twitch the number sometimes ends up being over 400. heres the command
“$(user), You longjumped $(eval Math.floor(Math.random() * 287) + 200) units”
Help please

Hi, if you need the range to be between 200 and 278 then it should be like this:

$(user), You longjumped $(eval Math.floor(Math.random() * 78) + 200) units

Thank you, Now I understand how it works :sweat_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.