toclanfane1, you can bet on the suggestions napa and I have made to you are to be heeded.
You should then apply our suggestion to your code to have it improved. Currently your latest code will result in what napa has demonstrated in his quote.
Your %random variable hasn't been filled and it returns no value before it's set. You really don't need the %random variable anyway.
We wouldn't have given you a valid suggestion if we knew it was not workable or incorrect.
"some ppl" DO try to help out and encourage each other to get better in MSL scripting. You shall not take this the wrong way and get annoyed.