Hi, I am having trouble with this command

This is supposed to be a fun random response command, but I can’t seem to get it to work.
Any suggestions and tips would be appreciated :smiley:

/me $(touser)! $(eval var a=[’ is: $(eval Math.floor((Math.random()*25)))% MercyWing1 CorgiDerp MercyWing2’, ’ is: $(eval Math.floor((Math.random()*25 + 25)))% GivePLZ captai551Smart TakeNRG’, "$(eval Math.floor((Math.random()*25 + 50)))% SSSsss ",’ is: $(eval Math.floor((Math.random()*25 + 74)))% DarkMode’,’ at 100% PowerUpL DarkMode PowerUpR’,’ is: … OVERLOAD ERROR! Squid1 SeriousSloth Squid4’]; a[Math.floor(Math.random() * a.length)])
I kept on tinkering with it, but I always get this response
Right-hand side of ‘instanceof’ is not an object

Hey @freezeflame99!

Fixed it for you:

$(eval a=[`${Math.floor(Math.random()*25)}% MercyWing1 CorgiDerp MercyWing2`,`${Math.floor(Math.random()*25)+25}% GivePLZ captai551Smart TakeNRG`,`${Math.floor(Math.random()*25)+50}% SSSsss`,`${Math.floor(Math.random()*25)+74}% DarkMode`,`at 100% PowerUpL DarkMode PowerUpR`,`... OVERLOAD ERROR! Squid1 SeriousSloth Squid4`];`/me $(touser) is ${a[Math.floor(Math.random()*a.length)]}`)

Your error was likely due to the use of the wrong quote mark, only use ', " or the back tick I used in the code I wrote. It’s often a syntax related error.

Thanks! It worked! I didn’t know that normal apostrophes wouldn’t work.

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