Iterating over a list
I have a list which contains other lists like so
cp=[ [10,10,4,-1], [100,100,12,1], ... ]
If I try to iterate over the list and add values like this...
for e in cp
e[0] += e[3]
...
I get an error: "Warning: e is not defined..."
Is this form of iteration read only? I can read values using this syntax elsewhere in the program:
for e in cp
local x = e[0]
Maybe it would work using a numeric for loop instead, if so what's the syntax, something like this?
for i = 0, 10
a = cp[i][0]
I'll probably dump the 'lists within a list' idea but I'm curious as to why it doesn't seem to work.