I have an error which I just do not understand, hopefully one of you guys will enlighten me. I have a script which plots lines between points. I am using polygons to make the lines thicker.
Most of the lines are plotted correctly but occasionally the script throws an error. Here is an example of values which caused this mysterious 'Undegfined offset' error.
Line 68 is the call to imagefilledpolygon.
I would have thought this error would occur if two adjacent plot points were the same but all the plot points are different.
Any clue why I am getting this error?
Keith
Code:
echo "$endx1,$endy1 | $endx2,$endy2 | $endx3,$endy3 | $endx4,$endy4<br><br>";
$poynts = array($endx1,$endy1,$endx2,$endy2,$endx3,$endy3,$endx4,$endy4);
imagefilledpolygon ( $thumb , $poynts, 4 , $hiculler );
Code:
312,260 | 311,255 | 374,247 | 375,252
Notice: Undefined offset: 0 in /[URL unfurl="true"]www.xxxxxxxxxxxxx[/URL] on line 168
I would have thought this error would occur if two adjacent plot points were the same but all the plot points are different.
Any clue why I am getting this error?
Keith