Hello, i've tried to load an background from json level pack is this possible?
my load routine looks like this:
self.curPack = sets:get("curPack")
self.curLevel = sets:get("curLevel")
self.level = dataSaver.load("levels/"..self.curPack.."-"..self.curLevel)
for i, value in ipairs(self.level) do
if value.type == "backgrounds" then
local background = Bitmap.new(Texture.new("graphics/value.back", true))
end
end |
my json level pack file looks like this:
[{"type":"backgrounds","back":back1.png}]
i can't load the right background. everytime i get an error.
this is the error:
classes/json.lua:318: Error reading 'true': [{"type":"backgrounds","back":tile.png}]
stack traceback:
classes/json.lua:318: in function 'TestReservedWord'
classes/json.lua:301: in function
(tail call): ?
classes/json.lua:457: in function
(tail call): ?
classes/json.lua:415: in function
(tail call): ?
(tail call): ?
(tail call): ?
Comments
not