, okno.
s.de.I have problem with removing keys from a table.
I understand what's not working and why, but i can't find solution for that:
Let's think there is a table
1
2
3
4
5
6
2
3
4
5
6
T={
[1]={},
[2]={},
[3]={}}
T[2]=nil
1
2
3
2
3
T={
[1]={},
[3]={}}
If i use
table.remove(t,pos)it lead to loop working not correct, you know why.
Well, the first method would be great but how to make after that loop that table is fixed with this example:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
table={
	[1]="one",
	[2]="two",
	[3]="three",
	[4]="four",
	[5]="five"}
table[1]=nil
table[3]=nil
table[4]=nil
1
2
3
2
3
table={
	[2]="one",
	[5]="five}
Any ideas?
Table removing value or nil this value in loop
1 

Offline
Yates


