Hi!
I have a table that is supose to be empty first. When I add stuff to it it should look like this for example:
table = { {startX = 1, startY = 3, hasDot = true} {startX = 2, startY = 2, hasDot = true} } --[[so table[2].hasDot == false --]]
This is what I did:
1. lines = {} -- I have this. 2. 3. 4. 5. if(lines[id] == nil) then 6. lines[id].startX = grp.parent.x + x1 7. lines[id].startY = grp.parent.y + height\_s - y1 8. lines[id].hasDot = true
Line 6 here is says “attempt to index field ‘?’ (a nil value)”
And I guess line 7 and 8 are wrong too.
How can I add to the table to look like the example above?
I thought this had an obvious answer but I didn’t find anything on google:S
Regards!