Slot machines “missing) after argument”

Hi there! Im a moderator for a good friend of mine and it was recently an idea to add a slot machine through nightbot into his channel, im usually better at that kind of stuff than he is but im a little stuck. I keep getting “missing) after argument” whenever i try to activate the command. Heres my code

$ (eval a=$ (urlfetch json https://;a[Math.floor(Math.random()*a.length)])

Im not finished with all the slot machine outcomes i was just testing to see if it worked😅 glad i did

Hey @coco_knutz!

I get the feeling you’ll enjoy fixing it yourself instead of copy/pasting the response, so here are a couple hints to help you solve your issue:

  • The Pastebin link has two https:// instead of one.
  • You need use the raw version of the paste: /raw/PASTE_ID.
  • There’s an extra space between the $ and the Nightbot variables, should be: $(eval) and $(urlfetch), otherwise they won’t work.
  • The paste should be a valid JSON array for it to work: meaning an opening bracket [ at the start of the file, a closing bracket ] at the end of the file, and every strings between double quotes " instead of single quotes '.

Hopefully that’ll help, let me know!

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