This tms scripter is killing me.
Oops! Is it an
script? No wonder it barked at the type helper, then! Sorry, didn't read enough of the thread ...

If all else is working then try replacing the single Inc(sPos, 2) with either:
or with:
Either of them should work, according to the documentation and the error message.
ETA: I don't want to sound snarky but ... rather than copy-pasting you should try to understand what our code is trying to do so you can replace it with the appropiate one for TMS Script. In this particular case it should have been clear that it's increasing sPos by 2, so the solution(s) should have been obvious to you ... Just saying
