Post the entire script please. Make sure to format the code properly - see Posting guidelines in #Help channel