|
|
||
|
|
It seems that assigning nil to a non-existant entry 'can' cause an
error. Try the following code: list = { a = 1, b = 2, c = 3, d = 4, e = 5, f = 6 } for k, v in pairs( list ) do print( "key: " .. k .. " value: " .. v ) list[ k ] = nil list[ "some key" ] = nil end I get an invalid key for 'next' error everytime. But interestingly enough, merely change "some key" to "some non-existant key" and it doesn't crash. I have not been able to reproduce a crash where setting an existant key caused an error (yet?). Jack Wim Couwenberg wrote:
|