#JS switch doesn't seem to work

21 messages · Page 1 of 1 (latest)

keen bane
blissful mirageBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

fading frigateBOT
#

Paste version of genesis_announcer.js from @keen bane

grizzled yoke
#

use Utils.random.nextInt(0,11) // 0 upto 10

#

just to see if your math random is not weird

keen bane
#

Using the commented code below worked but squoshi proposed switch which I preferred after seeing how it worked

#

But ye just a moment

toxic imp
grizzled yoke
#

no

keen bane
#

It worked

toxic imp
#

it does

grizzled yoke
#

it is nextInt not next float

keen bane
grizzled yoke
#

or nextdouble

#

so your math random is not right?

keen bane
#

How would I fix it without the Utils.random.nextInt()?

keen bane
#

Yours is working just fine

grizzled yoke
#

Lat says we should use native java when we can so I just use Utils because it calls java

keen bane
#

Thanks as always ^-^