Invalid token with pastebin

i am having issues trying to make randomized responses work. this literally the first time ive tried to do anything like this, so im mute to some of the language used. I have this in the messages section for nightbot:
$(eval a=$(urlfetch json;a​[Math.floor(Math.random()*a.length)])

the pastebin url is:

ive gone line by line and made sure i had ` before and after with the coma at the end. what am i doing wrong? i keep getting “Invalid or unexpected token” when i type the command.

Hey @fr1day21!

I don’t see the issue, I added the command like you wrote it and it works just fine:

1 Like

I tried it - even keeping the same paste bin and got " Unexpected identifier"

I’ve tried testing it out and I can’t get the same result as you @Emily idk what the issue is. My best advice is to just get rid of the ` and , and put ; at the end of each line and just spilt it to turn it into an array as that has worked for me in the past. But you’ll probably need night to tell you why it’s not working.

I don’t know what’s the issue then, because it still works for me.
This is the command I copy/pasted in my chat twice now, exactly what was typed above:

$(eval a=$(urlfetch json;a​[Math.floor(Math.random()*a.length)])
1 Like

I have copied your text Emily, and I get ‘Invalid or unexpected token’,

I am having this problem as well, which I’m trying to resolve…

I can’t reproduce the issue so I can’t fix it, I hope it makes sense.
@potatoeaterlove, who experienced the issue, offered a solution.


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