lua attempt to index field ? a nil

不详细说,看例子

local t = {}
print(t[2].a) --t[2]本身是nil,所以是nil.a
lua: /usercode/file.lua:3: attempt to index field '?' (a nil value)
stack traceback:
	/usercode/file.lua:3: in main chunk
	[C]: in ?

你可能感兴趣的:(C++与lua交互,bug清单,lua,attempt)