diff --git a/birb/core/datas.lua b/birb/core/datas.lua index b1b008e..324e748 100644 --- a/birb/core/datas.lua +++ b/birb/core/datas.lua @@ -36,9 +36,11 @@ end function DataManager:loadDatas() self.datapacks = {} - for key, datas in pairs(index.datapacks) do - self.core.debug:debug("datamanager", "loading data for " .. key) - self.datapacks[key] = DataPack(datas[1], datas[2], datas[3], datas[4], datas[5]) + if (index.datapack ~= nil) then + for key, datas in pairs(index.datapacks) do + self.core.debug:debug("datamanager", "loading data for " .. key) + self.datapacks[key] = DataPack(datas[1], datas[2], datas[3], datas[4], datas[5]) + end end end