Neuron

Neuron

98.2k Downloads

[Classic] PlayerHasToy (a nil value)

crosenbe opened this issue ยท 3 comments

commented

This issues appears during dismounting. Actionbar6 Button 1 contains following macro.
/use Horn des Terrorwolfs

Date: 2020-04-19 17:32:39
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\Neuron\Objects\BUTTON.lua line 771:
   attempt to call global 'PlayerHasToy' (a nil value)
Debug:
   Neuron\Objects\BUTTON.lua:771: UpdateUsableItem()
   Neuron\Objects\BUTTON.lua:735: ?()
   ...LibThreatClassic2\Libs\AceTimer-3.0\AceTimer-3.0.lua:55:
      ...LibThreatClassic2\Libs\AceTimer-3.0\AceTimer-3.0.lua:50
Locals:
self = NeuronActionBar6_ActionButton1 {
 0 = <userdata>
 class = "ActionBar"
 tooltips = true
 __MSQ_bType = "Action"
 bindColor = "1;1;1;1"
 spellGlowDef = true
 macroText = false
 multiSpec = false
 bar = NeuronActionBar6 {
 }
 __MSQ_NormalSkin = <table> {
 }
 macroColor = "1;1;1;1"
 __MSQ_NormalHook = true
 rangeInd = true
 barLock = true
 cdcolor2 = <table> {
 }
 objType = "ACTIONBUTTON"
 countText = true
 __MSQ_NormalColor = <table> {
 }
 debuffcolor = <table> {
 }
 barLockAlt = false
 upClicks = true
 tooltipsEnhanced = true
 noAction = "Interface\Buttons\UI-Quickslot"
 config = <table> {
 }
 showGrid = false
 FlyoutArrow = NeuronActionBar6_ActionButton1FlyoutArrow {
 }
 __MSQ_Icon = NeuronActionBar6_ActionButton1IconFrameIcon {
 }
 SetNormalTexture = <function> defined =[C]:-1
 FlyoutBorderShadow = NeuronActionBar6_ActionButton1FlyoutBorderShadow {
 }
 elements = <table> {
 }
 cdAlpha = 1
 UnwrapScript = <function> defined @Interface\FrameXML\SecureHandlers.lua:788
 downClicks = false
 barLockShift = true
 macro = " 
/use Horn des Terrorwolfs 
"
 __MSQ_Addon = "Neuron"
 unit = "target"
 UberTooltips = true
 item = "Horn des Terrorwolfs"
 cdcolor1 = <table> {
 }
 binder = NeuronActionBar6_ActionButton1BindFrame {
 }
 __MSQ_Shape = "Square"
 skinned = true
 tooltipsCombat = false
 Execute = <function> defined @Interface\FrameXML\SecureHandlers.lua:777
 __MSQ_Gloss = <unnamed> {
 }
 barLockCtrl = false
 cdText = false
 spellGlow = true
 __MSQ_oType = "CheckButton"
 SetFrameRef = <function> defined @Interface\FrameXML\SecureHandlers.lua:793
 rangecolor = <table> {
 }
 __MSQ_Enabled = true
 __MSQ_Normal = <unnamed> {
 }
 __MSQ_ChargeSkin = <table> {
 }
 hasAction = "Interface\Buttons\UI-Quickslot2"
 DB = <table> {
 }
 WrapScript = <function> defined @Interface\FrameXML\SecureHandlers.lua:782
 manacolor = <table> {
 }
 statedata = <table> {
 }
 id = 1
 buffcolor = <table> {
 }
 isShown = true
 equipcolor = <table> {
 }
 editor = NeuronActionBar6_ActionButton1EditFrame {
 }
 spellGlowAlt = false
 FlyoutBorder = NeuronActionBar6_ActionButton1FlyoutBorder {
 }
 data = <table> {
 }
 countColor = "1;1;1;1"
 keys = <table> {
 }
 rangeTimer = <table> {
 }
 bindText = false
}
isUsable = false
notEnoughMana = false
itemID = 5665
(*temporary) = nil
(*temporary) = 5665
(*temporary) = "attempt to call global 'PlayerHasToy' (a nil value)"
commented

Ok I'll add in a safety check there. Nice catch

commented

Please test with the latest MASTER and let me know if it's fixed

commented

Tested and fixed, thanks a lot.