Using Math.random.

Newbie Spellweaver
Joined
Dec 20, 2015
Messages
44
Reaction score
0
I'm trying to make my setEventMap to randomize 9 maps each time it's used.

So I tried adding under EventManger :
Code:
    public void setEventMap(int id){
        for (int i = 1; i <= Channel.getAllInstances().size(); i++) {
              int[] maps = {100000202, 220000006, 682000200, 280020000, 610020000, 109040000, 101000100, 105040310, 105040310};
            Channel.getInstance(i).setEventMap([U][B]maps[/B][/U](Math.floor(Math.random() * 9)));
        }
    }

It pops an error at "maps" asking me to create a "maps(double)" function in EventManager.java.

Anyone know what's wrong with my usage of math.random?
 
Back