Help with Eval Command?

$(user) has used the $(eval const responses = [‘Italian Game’, ‘English Opening’, ‘Sicilian Defence’, ‘Bongcloud Attack’, ‘Fool’s Gambit’, ‘Halloween Gambit’, ‘Ware Opening’, ‘French Defence’, ‘Ruy-Lopez’, ‘Damiano’s Defence’, ‘Alekhine’s Defence’]; responses[Math.floor(Math.random() * responses.length)]:wink: $(eval const responses = [‘to win against’, ‘but lost to’]; responses[Math.floor(Math.random() * responses.length)]:wink: $(urlfetch http://2g.be/twitch/randomviewer.php?channel=$(channel)).

Is the command I’m trying to make, but it keeps saying
"TCOdelt has used the Right-hand side of ‘instanceof’ is not an object to win against tcodelt ."

There are four problems with your command:

  1. It is 501 characters (500 characters is the max)
  2. You left out the closing parenthesis after both of your $(eval ...) variables
  3. You are using opening and closing apostrophes (‘ and ’) instead of straight single quotes (’) or straight double quotes (’) to enclose strings
  4. There is no space before :wink:, so Twitch won’t display the emoji

Also, isn’t unnecessary to make your two responses variables const, so I removed that modifier to make the command under 500 characters.

New command:

$(user) has used the $(eval responses = ["Italian Game", "English Opening", "Sicilian Defence", "Bongcloud Attack", "Fool’s Gambit", "Halloween Gambit", "Ware Opening", "French Defence", "Ruy-Lopez", "Damiano’s Defence", "Alekhine’s Defence"]; responses[Math.floor(Math.random() * responses.length)]) :wink: $(eval responses = ["to win against", "but lost to"]; responses[Math.floor(Math.random() * responses.length)]) :wink: $(urlfetch http://2g.be/twitch/randomviewer.php?channel=$(channel))

If you want to fit more responses into your command, there are many unnecessary spaces you can remove. You can also rename the responses variable to a single character, such as r.

Thanks! The winks werent actually intentional, meant to just put the “;)” without it becoming a wink

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