WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Plugin Support (https://www.wowinterface.com/forums/forumdisplay.php?f=94)
-   -   nUI Infopanel Professions - New Lua Error (https://www.wowinterface.com/forums/showthread.php?t=44309)

UrbanArmitage 09-12-12 12:50 AM

nUI Infopanel Professions - New Lua Error
 
Hi all,

After the maintenance on the EU servers this morning there was a new 7Mb download that took place, and when logging in after that a new nUI Infopanel Professions Lua error started occuring. I have quoted the bugcatcher info below. Something must have changed with today's update to break this addon again because it has been working fine since it was updated post 5.0.4 release.

Code:

Date: 2012-09-12 08:38:11
ID: 5
Error occured in: Global
Count: ∞
Message: ...rface\AddOns\nUI_InfoPanel_Profesions\Profesions.lua line 123:
  GetSpellCooldown(): Invalid spell slot
Debug:
  [C]: ?
  [C]: GetSpellCooldown()
  ...rface\AddOns\nUI_InfoPanel_Profesions\Profesions.lua:123:
      ...rface\AddOns\nUI_InfoPanel_Profesions\Profesions.lua:121
Locals:
(*temporary) = nil

AddOns:
  Swatter, v5.14.5335 (KowariOnCrutches)
  NPCScan, v5.0.0.1
  NPCScanOverlay, v5.0.0.1
  AltsMail, v1.02
  AucAdvanced, v5.14.5335 (KowariOnCrutches)
  AucFilterBasic, v5.14.5335 (KowariOnCrutches)
  AucFilterOutlier, v5.14.5335.5335(5.14/embedded)
  AucMatchUndercut, v5.14.5335.5225(5.14/embedded)
  AucStatHistogram, v5.14.5335 (KowariOnCrutches)
  AucStatiLevel, v5.14.5335 (KowariOnCrutches)
  AucStatPurchased, v5.14.5335 (KowariOnCrutches)
  AucStatSales, v5.14.5335.5335(5.14/embedded)
  AucStatSimple, v5.14.5335 (KowariOnCrutches)
  AucStatStdDev, v5.14.5335 (KowariOnCrutches)
  AucStatWOWEcon, v5.14.5335.5335(5.14/embedded)
  AucUtilAHWindowControl, v5.14.5335.5133(5.14/embedded)
  AucUtilAppraiser, v5.14.5335.5335(5.14/embedded)
  AucUtilAskPrice, v5.14.5335.5160(5.14/embedded)
  AucUtilAutoMagic, v5.14.5335.5335(5.14/embedded)
  AucUtilCompactUI, v5.14.5335.5335(5.14/embedded)
  AucUtilEasyBuyout, v5.14.5335.5238(5.14/embedded)
  AucUtilFixAH, v5.14.5335 (KowariOnCrutches)
  AucUtilItemSuggest, v5.14.5335.5335(5.14/embedded)
  AucUtilPriceLevel, v5.14.5335.5237(5.14/embedded)
  AucUtilScanButton, v5.14.5335.5335(5.14/embedded)
  AucUtilScanFinish, v5.14.5335.5153(5.14/embedded)
  AucUtilScanProgress, v5.14.5335.4979(5.14/embedded)
  AucUtilScanStart, v5.14.5335.5153(5.14/embedded)
  AucUtilSearchUI, v5.14.5335.5335(5.14/embedded)
  AucUtilSimpleAuction, v5.14.5335.5208(5.14/embedded)
  AucUtilVendMarkup, v5.14.5335.4828(5.14/embedded)
  Auctionator, v3.0.4
  Babylonian, v5.1.DEV.312(/embedded)
  BeanCounter, v5.14.5335 (KowariOnCrutches)
  BetterExtraActionButton, v1.1.1
  BetterPowerBarAlt, v1.4
  Configator, v5.1.DEV.330(/embedded)
  CookingHelper, v1.80
  DBMCore, v
  DebugLib, v5.1.DEV.312(/embedded)
  Enchantrix, v5.14.5335 (KowariOnCrutches)
  EnchantrixBarker, v5.14.5335 (KowariOnCrutches)
  FarmHud, v5.0-Release1
  GatherMate2, v1.18
  GTFO, v4.14
  Informant, v5.14.5335 (KowariOnCrutches)
  LibExtraTip, v5.12.DEV.324(/embedded)
  MogIt, v3.0.5
  MogItHighlighter, vv1.0.1
  nUI, v5.07.25 (Plus)
  nUIInfoPanelDualStats, v5.07.19
  nUIInfoPanelProfesions, v1.02.05
  Omen, v3.1.7
  RatingBuster, v1.6.7
  Recount, v
  ReforgeLite, v1.12
  Routes, vv1.4.2
  SilverDragon, vv2.6.3
  SlideBar, v5.14.5335 (KowariOnCrutches)
  Stubby, v5.14.5335 (KowariOnCrutches)
  TipHelper, v5.12.DEV.315(/embedded)
  TolBaradReminder, v1.1.2
  TomTom, vv50001-1.0.2
  WIM, v3.6.1
  XMagePortals, v5.0.4.16016.120829.01
  BlizRuntimeLib_enUS v5.0.5.50001 <eu>
  (ck=9bd)


Xrystal 09-12-12 12:57 AM

Okay, will look into it tonight. Didn't log into wow the last 2 nights, way too tired after work rofl, so didn't see the error myself. Planning on doing a rewrite of it to work similar to my XMagePortals addon.

There was a new ancient portal ability that was added in one of the 5.0 versions so it is possible that they removed the ability which has flagged up this error. Will have to wait and see what my tests show.

Xrystal 09-12-12 01:34 AM

rofl, just realised I was getting confused with the mage portal addon itself. Not sure if they added or removed profession stuff.

Anyways,

you might want to try changing this block of code in that file:
Lua Code:
  1. local function UpdateCooldown(self)
  2.         local TimeNow = GetTime();
  3.         local CooldownStart, CooldownDuration, CooldownEnabled = GetSpellCooldown(SpellName);
  4.         if ( not CooldownEnabled ) then return; end
  5.         if ( CooldownDuration == 0 ) then return; end  
  6.         local DiffTime = TimeNow - CooldownStart;
  7.         local CooldownCounter = CooldownDuration - DiffTime;
  8.         CooldownCounter = math.floor(CooldownCounter);
  9.         if ( CooldownCounter > 0 ) then
  10.             self.Text:SetText(CooldownCounter);
  11.         else
  12.             self.Text:SetText(""); 
  13.         end
  14.     end

to

Lua Code:
  1. local function UpdateCooldown(self)
  2.                            >>>> if not Available then return end  <<<<<
  3.         local TimeNow = GetTime();
  4.         local CooldownStart, CooldownDuration, CooldownEnabled = GetSpellCooldown(SpellName);
  5.         if ( not CooldownEnabled ) then return; end
  6.         if ( CooldownDuration == 0 ) then return; end  
  7.         local DiffTime = TimeNow - CooldownStart;
  8.         local CooldownCounter = CooldownDuration - DiffTime;
  9.         CooldownCounter = math.floor(CooldownCounter);
  10.         if ( CooldownCounter > 0 ) then
  11.             self.Text:SetText(CooldownCounter);
  12.         else
  13.             self.Text:SetText(""); 
  14.         end
  15.     end

This way it should only try updating the cooldown if the ability is known to the player.

Daveo77 09-12-12 04:00 AM

Apart from bug that Xrystal found and provided fix for (thanks Xrystal), one other change was Blizzard changed the fishing spell ID (again!).

Both fixes have been done :)

Uploaded new version of addon (v004), which is currently awaiting approval.

Xrystal 09-12-12 06:20 AM

Thanks Dave,

I will probably do a remake of the addon to make it more flexible for people but not sure when yet.

crazzzzi 09-12-12 07:30 AM

Replace 7620 with 131476 for the fishing spell. thx Blizz for changing it yet again!

Daveo77 09-12-12 10:17 AM

Already done in the update that I uploaded today, which is now available to download from here.

UrbanArmitage 09-12-12 11:32 PM

Thank you all for your efforts ladies and gents! :)

Sorry I didn't comment again yesterday, I had a bit of a hectic day. You are quite right about it being the fishing spell because I noticed this morning that the fishing profession button was missing. Sorry, if I had noticed that when I reported the bug I would have let you guys know. :o

Daveo77 09-13-12 08:58 AM

v005 has been uploaded - reapplied spelling corrections (Profesions > Professions (from v003)).

Coasty 09-15-12 02:25 AM

Quote:

Originally Posted by Daveo77 (Post 263843)
v005 has been uploaded - reapplied spelling corrections (Profesions > Professions (from v003)).

The Spelling gods thank you :p

And thanks for putting it up on Curse.com for use with the Curse client.

Daveo77 09-15-12 03:24 AM

You're welcome


All times are GMT -6. The time now is 06:42 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI