You don't explain what your goal is here, nor do we have any data to work with. All we know is that your code generates an error; this doesn't tell us what's wrong, what it's trying to do, or anything.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk