Eval variable responses

Hi I try this commands for a chat
$(eval N=Math.floor((Math.random() * 10) + 1); “${N} mesage”)
But it does not show the number N, it only shows ${N} mesage

The purpose is to have a different message for some numbers, now this is a test

I try with ", ', ´ with no result

hey don_kastor,
try N+" message" instead of ${N}

like this:
$(eval N=Math.floor((Math.random() * 10) + 1); N+" mesage")

1 Like

Hey @don_kastor!

None of the characters you’ve used could have worked, try with backticks `, instead of quotes ", don’t change anything else.

Oh, this work, thank’u <3

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