Thats because you pasted a function right in the middle of another function.
"Does not work" is an error report for a bug between keyboard and chair. All hail Artie Effem
Forum Rules