diff ReAction.lua @ 248:9e708a155ab9

Fixed Stance/Shapeshift bar not being saved correctly across reboots
author Flick
date Mon, 28 Mar 2011 10:43:36 -0700
parents 47818b3938c9
children 36a29870bf34
line wrap: on
line diff
--- a/ReAction.lua	Sat Mar 26 12:46:06 2011 -0700
+++ b/ReAction.lua	Mon Mar 28 10:43:36 2011 -0700
@@ -228,8 +228,10 @@
     config.x          = config.x or 0
   else
     config = config or profile.bars[name] or { }
-    if not config or not config.type or not self.barTypes[config.type] then
-      error(("ReAction: Unable to construct/fetch config table for bar '%s'"):format(name))
+    if not config then
+      error(("ReAction: Unable to fetch config table for bar '%s'"):format(name))
+    elseif not config.type or not self.barTypes[config.type] then
+      error(("ReAction: Unrecognized bar type '%s' for bar '%s'"):format(tostring(config.type), name))
     end
     class = self.barTypes[config.type]
   end