What is wrong with that command? (if/else)

Asked Apr 25, 2024·3 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

it was working before but for some reason it doesn't work anymore

$(eval u='$(user)'; if(u=='dust_88'){'$(touser) zurna boyutu $(eval Math.floor(Math.random() * 30) + 1) cm'} else{'$(touser) zurna boyutu $(eval Math.floor(Math.random() * 20) + 1) cm'})

edit: command works but if/else doesn't work anymore

3 replies

um... none of the code looks amiss... maybe try adding .toLowerCase() to "if(u==‘dust_88’)" like this...

js
if(u.toLowerCase()==`dust_88`)

(explanation for this guess... u may have updated your twitch display name from dust_88 to Dust_88 like u have here, which wouldn't match your comparison, this addition to the code compensates for that)