From 97b3cc1d31fb9e7fd0827c8b8039ba18d0a221f1 Mon Sep 17 00:00:00 2001 From: atom0s Date: Tue, 26 Jun 2018 22:19:41 -0700 Subject: [PATCH] Fix issue caused by recent addons update giving error messages on missing required files. --- ibar.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ibar.lua b/ibar.lua index af70cbe..6f19809 100644 --- a/ibar.lua +++ b/ibar.lua @@ -24,7 +24,7 @@ _addon.author = 'Vicrelant'; _addon.name = 'ibar'; -_addon.version = '3.0.1'; +_addon.version = '3.0.2'; require 'common' @@ -106,7 +106,7 @@ ashita.register_event('load', function() local ZoneID = AshitaCore:GetDataManager():GetParty():GetMemberZone(0); - mb_data = require('data.' .. tostring(ZoneID)); + local _, mb_data = pcall(require, 'data.' .. tostring(ZoneID)); if (mb_data == nil or type(mb_data) ~= 'table') then mb_data = { }; end @@ -402,7 +402,8 @@ ashita.register_event('incoming_packet', function(id, size, packet) end -- Update our mob list.. - mb_data = require('data.' .. tostring(zoneId)); + --mb_data = require('data.' .. tostring(zoneId)); + _, mb_data = pcall(require, 'data.' .. tostring(zoneId)); if (mb_data == nil or type(mb_data) ~= 'table') then mb_data = { }; end