I am aware this might seem like a duplicate, however, I have viewed these posts (1 & 2) and have been unable to solve this.
DynamicModule[{pt = {.5, .5}, ll = {},
base = {White, Rectangle[{0, 0}, {2, 2}]}},
LocatorPane[Dynamic[pt, (AppendTo[ll, #]; pt = Last@ll) &],
Dynamic[Show@
Graphics[{base,
With[{newpts = Partition[ll, 2, 1]},
Table[{i, Line[newpts[[i]]]}, {i, 1, Length[newpts], 1}]]}]
]]]
Would someone be able to help me to solve this error? Thank in advance