I have a quick syntactical question - why does this work:
[lua]local foobar =
{
{ 10, -60 },
{ 60, -60 },
{ 110, -60 },
{ 160, -60 },
{ 210, -60 },
{ 260, -60 }
}
print("size: " … #foobar);[/lua]
but this doesn’t?
[lua]local foobar =
{
pos1 = { x = 10, y = -60 },
pos2 = { x = 60, y = -60 },
pos3 = { x = 110, y = -60 },
pos4 = { x = 160, y = -60 },
pos5 = { x = 210, y = -60 },
pos6 = { x = 260, y = -60 }
}
print("size: " … #foobar);[/lua]
I have seen tutorials that use both syntaxes - perhaps I’m mutilating the syntax or using it inappropriately? [import]uid: 41286 topic_id: 18268 reply_id: 318268[/import]