function love.load()
Tileset = love.graphics.newImage('countryside.png')
TileW, TileH = 32, 32
local tilesetW, tilesetH = Tileset:getWidth(), Tileset:getHeight()
Quads = {
love.graphics.newQuad(0, 0, TileW, TileH, tilesetW, tilesetH) -- 1 = grass
love.graphics.newQuad(32, 0, TileW, TileH, tilesetW, tilesetH) -- 2 = box
love.graphics.newQuad(0, 32, TileW, TileH, tilesetW, tilesetH) -- 3 = flowers
love.graphics.newQuad(32, 32, TileW, TileH, tilesetW, tilesetH) -- 4 = box
}
TileTable = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
end
此代码提供此错误:
语法错误:main.lua:9:'}'预期(关闭'在第7行)靠近爱情'
我不明白。有人得到任何帮助吗?
答案 0 :(得分:1)
在Lua中,数组初始化如下,希望它有所帮助:
@Id @GeneratedValue(strategy=GenerationType.AUTO)
OR
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) // both are the same thing
@Column(name = "Id", unique = true, nullable = false)
public Long getId() {
return this.Id;
}
public void setId(Long Id) {
this.Id = Id;
}