Also remember that For loops loop up to and including the value of the last parameter, meaning that if L is 0, then For(H,0,L) loops from 0 to 0, or one time. This is incorrect because if the length is zero, it should not loop at all. For(H,0,L−1) doesn't work either, because if L is 0, then it loops from 0 to -1 (or 65535), which is not good. In the end you should do something like the following:
:For(H,1,L)
:Pxl-On({H−1∗2+L₁},{H−1∗2+L₁+1})
:End
or slightly more optimized:
:For(H,1,L)
:Pxl-On({H∗2+L₁−2},{H∗2+L₁+1−2})
:End