Why are there only 4 fields in this Lua table? Shouldn't there be 7?
polyline = {color="blue", thickness=2, npoints=4,
{x=0, y=0},
{x=10, y=0},
{x=-10, y=1},
{x=0, y=1}
}
print(table.maxn(polyline)) -- returns 4. Why?
print(polyline[2].x) -- returns 10. Why?
I thought polyline[2]
would index to "thickness", which is the 2nd field in this table.