The rand function from VX ACE

The rand(x) function no longer seems to work for me in MV, having to do with Ruby to JavaScript I'm assuming. Is there a function for MV that does the exact same thing?
Yes. You could do a search to see how to generate random numbers in javascript.


Math.floor(Math.random(x)) + 1


will give you a random number between 1 and x, inclusive.

Original thread: https://forums.rpgmakerweb.com/threads/the-rand-function-from-vx-ace.50635/