1
當我試圖解開這個表上的圖像調用,程序將返回錯誤「壞參數解包(表有望得到用戶數據)」love2D錯誤:解壓預期表得到了用戶數據
textures = {love.graphics.newImage("image.png"),
love.graphics.newImage("image.png"),
love.graphics.newImage("image.png"),
love.graphics.newImage("image.png"),
}
這是我現在用的桌子
drawScreenLineTexture[x] = {unpack(textures[map[mapX][mapY]])}
if side == 1 then
drawScreenLineTexture[x][1] = drawScreenLineTexture[x][1]/2
drawScreenLineTexture[x][2] = drawScreenLineTexture[x][2]/2
drawScreenLineTexture[x][3] = drawScreenLineTexture[x][3]/2
end
這是我試圖解開表
'love.graphics.newImage()'返回一個用戶數據。爲什麼你期待加載的圖像是一張桌子? –