Very new to this -> invalid variable response

Asked Feb 2, 2022·2 replies·Last activity 4 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.

hi!
i am trying to realize a simple if statement. but i just cant get it to work.

$(eval
var a = "hello";
if (a === "hello"){"it works";}
else {"this shouldnt show up";}
)

pls send hALP. thanks in advance!

2 replies

Invalid variable only shows up if the nightbot variable doesn’t exist to my knowledge check the spelling of $(eval)
Also please note nightbot does not recognize next line and tabs as valid spaces so what it is probably reading it as is $(evalvar)

thanks so much for the feedback. will test it!
Edit: It works now. thanks for the info <3