Unexpected identifier

Hi, if been looking at this for a while and tried solutions I could find online but I still get the error Unexpected identifier. I want to creat a list of Items of which nightbot than picks one randomly

$(eval a=$(urlfetch json https://pastebin.com/raw/JZHKssVp).split(|);a[Math.floor(Math.random()*a.length)])

Can someone help me spot the mistake or mistakes?

likely the lack of quotes in the split… .split(“|”) should work better

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