0

这个问题实际上只有在我对“播放器”类多一行时才会出现。

代码:

function love.load()
player = {
    x = 0,
    y = 0,
    dky = character
    y_velocity = 0,
    jump_time = 1,
    jump_time_max = 1,
    character = love.graphics.newImage("gfx/character.png")
}
gravity = 400
jump_height = 300
winW, winH = love.graphics.getWidth(), love.graphics.getHeight()

结尾

4

1 回答 1

3

您可能忘记在后面添加逗号

character = love.graphics.newImage("gfx/character.png")

当您将另一行添加到player.

您提供的代码已经存在这个问题: . 后面缺少逗号dky = character

于 2014-03-24T16:01:22.083 回答