[Error Connecting To WebEval Service]

Hey! Im having a problem with nightbot’s $(eval) variable, basically, I met some people in an off chat and we waned to start doing a RPG at my chat! And i wanted to do a “!roll20” for tests, basically, i wanted it to show how much did you roll, and if you had a success or not. so i started testing:

$(user) rolled an $(eval var dice = Math.floor((Math.random() * 20)); var s = 20 - $(query); var message = ""; if (dice >= s &&  $(query) <= 18 && $(query) > 0) {mensagem = ". It's a success!"}; dice; message)

but then what i got was:

!roll20 10
12:29 Nightbot: (me) rolled an [Error Connecting To WebEval Service]

So, can anyone help me?

It should be dice+message also you have messagem=“” you don’t need the m

Hey, thanks! Helped me a ton, I was almost going crazy

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