Quote:
Originally Posted by BboyEatsbacon
You all are making it so complex, but with GS2, you can tackle this problem simply.
PHP Code:
function onCreated() { this.possibilities = { "5", "10" };
drawRandomNumber(); }
function drawRandomNumber() { this.number = randomstring(this.possibilities); }
While this is not good practice for other engines, GS2 supports inputting a string as an integer, so this script would work smoothly.
|
randomString() is not a good option. It's been bugged for a long time, and sometimes results in a blank result. With
sometimes, I really mean fairly often.