hope you would help me to understand
Forum




table index is nil
3 replies



hope you would help me to understand
The table index is an identifier for an array to get a value.
For example:
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
a={} a[2]=4 --2 is the index b={} b[function() msg("hello") end]=true --function() msg("hello") end is the index c={} c["hello"]=2 --hello is is the index
When you get the error "table is nil" it's most likely that you used a variable for the table index.
1
awesome[player(id,"name")]=true
In this case, id could have been nil, player returns false or an empty string so that must not have been what caused the index to be nil.
@




