How does one go about creating a random number generator that generates a number from 1-20?

All generators that I've found in these forums have returned "null" as a result. How would I make a generator that actually works?

The simplest would probably be using a little javascript.

    squiffy.set("randomnumber", Math.floor(Math.random() * 20) + 1);

The random number is {randomnumber}.

Yup! And just remember that when you use the code, the JavaScript is tabbed and comes BEFORE Andy regular text. Otherwise it messes things up.

Log in to post a reply.