Precisely what Taracita said. You're creating variables, but you're not checking if the variables are active or not.

Here are some useful reads that will help you come to the next level of mSL

/help variables
/help aliases
/help if then else