我的lua代码中出现以下错误: - 尝试调用字段'pullEvent'(零值)
代码如下:
while true do
print("Press E to do something.")
local event, key ,x ,y= os.pullEvent("char") -- limit os.pullEvent to the 'key' event
if key == keys.e then -- if the key pressed was 'e'
print("You pressed E. Exiting program...")
break
end
end
我该如何解决?