Right-hand side of 'instanceof' is not an object

So I was helping create an RNG command for an artist streamer and can’t seem to get it working. Gonna be making Multiple category’s, it’s to help to come up with ideas. Thinking a second hand of eyes is needed.

!commands add !animal $(eval a=[‘Zebra’, ‘ Cat’, ‘Dog”, ‘Wolf’,’Capybara’,’Elephant’,’Ostrich’,’Lion’,’Tiger’,’Panther’,’Cougar’,’Snek’,’Owl’,’Crow’,’Hippo’,’Bird’,’Jaguar’,’Fox’,’Llama’,’Koala’,’Giraffe’,’Panda’,’Goat’,’Bunny’,’Horse’,’Lizard’,’Chicken’,’Bear’,’Sloth’,’Cow’];a[Math.floor(Math.random() * a.length)])

@botogoxrunner

My primary concern is how you’re wrapping quotes around the strings in the array. I’ve polished up the code a bit.

!addcom -cd=5 !animal $(eval a=[`Zebra`,`Cat`,`Dog`,`Wolf`,`Capybara`,`Elephant`,`Ostrich`,`Lion`,`Tiger`,`Panther`,`Cougar`,`Snek`,`Owl`,`Crow`,`Hippo`,`Bird`,`Jaguar`,`Fox`,`Llama`,`Koala`,`Giraffe`,`Panda`,`Goat`,`Bunny`,`Horse`,`Lizard`,`Chicken`,`Bear`,`Sloth`,`Cow`];a[Math.floor(Math.random()*a.length)])

oh wow looks a lot better
Thank you i will keep that in mind
Still very new to this so any help is nice

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.