简体   繁体   English

尝试索引全局“ love”(零值)

[英]attempt to index global 'love' (a nil value)

Can anyone explain to me what should i do to solve the problem ? 谁能向我解释解决该问题该怎么办?

function love.load()
      love.window.setTitle(TITLE) -- Change le titre de la fenêtre
      local imgIcon = love.graphics.newImage(PATH_ICON) 
      love.window.setIcon(imgIcon:getData()) 
      love.window.setMode(WIN_WIDTH, WIN_HEIGHT) 
    .
    .
    end

You need to select LOVE as the interpreter ( Project | Lua Interpreter | LOVE ) instead of the default Lua interpreter. 您需要选择LOVE作为解释器( Project | Lua Interpreter | LOVE ),而不是默认的Lua解释器。 The error you are getting indicates that the interpreter you are launching doesn't have anything assigned to the love variable. 您收到的错误表明您正在启动的解释器未分配任何内容给love变量。

First thing : did you install love2d ? 第一件事:您安装了love2d吗?

If yes: did you check that the path to love2d was set in zerobrane? 如果是,您是否检查过love2d的路径是否设置为零溴?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM