试图调用字段' pullEvent' (零值)

时间:2014-09-18 08:11:59

标签: lua

我的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

我该如何解决?

0 个答案:

没有答案