Error with code, maybe?

I’m trying to create a command that 80% of the time comes back with one answer and 20% a dfifferent answer. Is this the right code?

$(eval Math.floor(Math.random()*100)==80?’$(user)‘s pp is so large, Nightbot has run for cover!’:'Sorry, $(user)‘s pp not found. Try using a magnifying glass!’)

It works in chat, but I want to be sure that the 20% answer will show up. I had it run about 20 times and all were the 80% answer. I want the “run for cover” to be 20% of the time.

Thanks!

It should be <=79 not ==80 as that will only trigger 1/100 times

oh oh oh!! Thank you!

EDIT: It works! This has been resolved! Thank you again!!!

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