Just realised the answer to my own problem.
The problem with:
repeat with i = 1 to 8
member("canvas").image.draw(getAt(glistOfPointsCatA, i),
getAt(glistOfPointsCatA, i+1), [#shapeType:#line, #lineSize:2, #color:
rgb(150, 0, 0)])
end repeat
was that on the last loop of the above script, the lingo is trying to
extract the 9th entry - which doesn't exist.
So this sorts it:
repeat with k = 1 to numOfQuestionsCatA
if k < numOfQuestionsCatA then
member("canvas").image.draw(getAt(glistOfPointsCatA, k),
getAt(glistOfPointsCatA, k+1), [#shapeType:#line, #lineSize:2, #color:
rgb(150, 0, 0)])
else
--complete polygon
member("canvas").image.draw(getAt(glistOfPointsCatA, k),
getAt(glistOfPointsCatA, 1), [#shapeType:#line, #lineSize:2, #color:
rgb(150, 0, 0)])
end if
end repeat
Getting the hang of this now.
Thanks if you've already replied.
Neil
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]