I have so much trouble making a coin flip command and I just can’t figure it out please can anyone help me?
!commands add !coinflip $(eval Math.random() < 0.5 ? 'heads' : 'tails')
4 Likes
It says invalid or unexpected token when I add that command.
If you haven’t changed anything, it should work fine.
I havent but when I type the : in $(eval Math.random() < 0.5 ? ‘heads’ : ‘tails’) it auto turns into a emote bc when you type : it makes an emote on twitch. Therefor it doesn’t work.
Hey @axiomaticmax!
That counts as a change, and it’s due to your settings.
If you remove the spaces that should prevent that from happening:
!addcom !coinflip $(eval Math.random()<0.5?`heads`:`tails`)
Oh my gosh thank you now it’s working!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.