Bagnon

Bagnon

126M Downloads

BagBrother/core/features/catching.lua

Mithras2801 opened this issue ยท 8 comments

commented

Which software were you running?

  • Addon version name: Latest 10.1.11 Bagnon
  • Client used: Retail 10.1.7.51485

Error Logs are Important!
3x BagBrother/core/features/caching.lua:93: table index is nil
[string "@BagBrother/core/features/caching.lua"]:93: in function ?' [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:109> [string "=[C]"]: ? [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function Fire'
[string "@Ace3/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Ace3/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self =

{
SendSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
ParseItem = defined @BagBrother/core/features/caching.lua:185
RegisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
SaveBag = defined @BagBrother/core/features/caching.lua:156
PLAYER_EQUIPMENT_CHANGED = defined @BagBrother/core/features/caching.lua:80
SaveEquip = defined @BagBrother/core/features/caching.lua:181
player =
{
}
SendMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
GUILDBANKBAGSLOTS_CHANGED = defined @BagBrother/core/features/caching.lua:130
UnregisterAllEvents = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
UnregisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
VAULT_CLOSE = defined @BagBrother/core/features/caching.lua:117
PLAYER_MONEY = defined @BagBrother/core/features/caching.lua:88
BANK_CLOSE = defined @BagBrother/core/features/caching.lua:107
RegisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
CURRENCY_TRACKED_CHANGED = defined @BagBrother/core/features/caching.lua:96
NewModule = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
PLAYER_LEVEL_UP = defined @BagBrother/core/features/caching.lua:84
OnEnable = defined @BagBrother/core/features/caching.lua:20
BAG_UPDATE = defined @BagBrother/core/features/caching.lua:74
RegisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
CURRENCY_DISPLAY_UPDATE = defined @BagBrother/core/features/caching.lua:92
GUILD_ROSTER_UPDATE = defined @BagBrother/core/features/caching.lua:126
UnregisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
Tag = "BAGNON_"
}
_ = "CURRENCY_DISPLAY_UPDATE"
id = nil
quantity = nil
(*temporary) =
{
1947 = 1235
1585 = 246702
1904 = 15
1719 = 393
1979 = 34
1810 = 33
2003 = 334
1755 = 6376
1885 = 9
1889 = 6
tracked =
{
}
738 = 5
1716 = 20
1220 = 805
1728 = 108
1803 = 4425
2032 = 1100
2533 = 8
2408 = 25
2034 = 5
2009 = 508
2087 = 1
1906 = 590
1721 = 55
1977 = 44
1540 = 76
1166 = 1620
2245 = 553
2021 = 3
1808 = 4
1560 = 570
2088 = 1
1883 = 10
2002 = 1
1828 = 3400
1580 = 4
1710 = 43
1586 = 30
1541 = 47
1533 = 853
1822 = 79
1226 = 167
1820 = 16
1767 = 1762
1931 = 3218
1275 = 5
1813 = 2416
1754 = 18
1155 = 250
}
(*temporary) = nil
(*temporary) = "table index is nil"

commented

Hello
Here the same Bug 10.1.11

2x BagBrother/core/features/caching.lua:93: table index is nil
[string "@BagBrother/core/features/caching.lua"]:93: in function ?' [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:109> [string "=[C]"]: ? [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function Fire'
[string "@Ace3/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Ace3/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self =

{
SendSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
ParseItem = defined @BagBrother/core/features/caching.lua:185
RegisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
SaveBag = defined @BagBrother/core/features/caching.lua:156
PLAYER_EQUIPMENT_CHANGED = defined @BagBrother/core/features/caching.lua:80
SaveEquip = defined @BagBrother/core/features/caching.lua:181
player =
{
}
SendMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
GUILDBANKBAGSLOTS_CHANGED = defined @BagBrother/core/features/caching.lua:130
UnregisterAllEvents = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
UnregisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
VAULT_CLOSE = defined @BagBrother/core/features/caching.lua:117
PLAYER_MONEY = defined @BagBrother/core/features/caching.lua:88
BANK_CLOSE = defined @BagBrother/core/features/caching.lua:107
RegisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
CURRENCY_TRACKED_CHANGED = defined @BagBrother/core/features/caching.lua:96
NewModule = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
PLAYER_LEVEL_UP = defined @BagBrother/core/features/caching.lua:84
OnEnable = defined @BagBrother/core/features/caching.lua:20
BAG_UPDATE = defined @BagBrother/core/features/caching.lua:74
RegisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
CURRENCY_DISPLAY_UPDATE = defined @BagBrother/core/features/caching.lua:92
GUILD_ROSTER_UPDATE = defined @BagBrother/core/features/caching.lua:126
UnregisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
Tag = "BAGNON_"
}
_ = "CURRENCY_DISPLAY_UPDATE"
id = nil
quantity = nil
(*temporary) =
{
829 = 75
1508 = 1718
385 = 24
1540 = 21
393 = 2
1906 = 440
1716 = 260
2002 = 18
1828 = 2700
2402 = 8
2003 = 2651
823 = 81568
1813 = 5375
2118 = 35980
1226 = 523
752 = 5
776 = 10
394 = 13
402 = 41
824 = 7702
1275 = 33
2122 = 42
1101 = 16925
1149 = 1066
777 = 2432
1721 = 3
1166 = 2375
738 = 204
1754 = 28
1342 = 285
1501 = 49
2025 = 2
1533 = 677
1803 = 9750
tracked =
{
}
1883 = 10
81 = 62
1931 = 1864
1820 = 44
1979 = 311
2032 = 5400
2594 = 361
2533 = 8
2245 = 1734
2088 = 25
2087 = 21
2033 = 3
994 = 8
416 = 34
1885 = 43
384 = 20
1155 = 2000
1171 = 40
1822 = 79
1559 = 1
1904 = 68
515 = 161
1810 = 57
828 = 22
1719 = 51
2009 = 13778
1977 = 20
1585 = 5698
1728 = 82
1755 = 23752
1889 = 5
1173 = 77
1220 = 4906
1808 = 3
697 = 1
1586 = 2
1560 = 27430
1767 = 263
821 = 13
2021 = 20
}
(*temporary) = nil
(*temporary) = "table index is nil"

commented

This bug (or a related bug) on line 93 has existed for at least 3 versions. It would be nice if issues were addressed and closed when fixed.

commented

Introduced in 10.1.8, fixed in 10.1.10 and reintroduced in 10.1.11.

To preserve line numbers change line 93 to:
if id and quantity then self.player.currency[id] = quantity > 0 and quantity or nil end

Note: The expression after the equals can probably be simplified after determining that id and quantity exist.

commented

Yup I keep having to add that if statement wrap back in on each update. :(

commented

6x BagBrother/core/features/caching.lua:93: table index is nil
[string "@BagBrother/core/features/caching.lua"]:93: in function ?' [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:109> [string "=[C]"]: ? [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...Ons/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Ace3/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function Fire'
[string "@Ace3/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Ace3/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self =

{
SendSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
ParseItem = defined @BagBrother/core/features/caching.lua:187
RegisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
SaveBag = defined @BagBrother/core/features/caching.lua:158
PLAYER_EQUIPMENT_CHANGED = defined @BagBrother/core/features/caching.lua:80
SaveEquip = defined @BagBrother/core/features/caching.lua:183
player =
{
}
SendMessage = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
GUILDBANKBAGSLOTS_CHANGED = defined @BagBrother/core/features/caching.lua:132
UnregisterAllEvents = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
UnregisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
VAULT_CLOSE = defined @BagBrother/core/features/caching.lua:119
PLAYER_MONEY = defined @BagBrother/core/features/caching.lua:88
BANK_CLOSE = defined @BagBrother/core/features/caching.lua:107
RegisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
CURRENCY_TRACKED_CHANGED = defined @BagBrother/core/features/caching.lua:96
NewModule = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
PLAYER_LEVEL_UP = defined @BagBrother/core/features/caching.lua:84
OnEnable = defined @BagBrother/core/features/caching.lua:20
BAG_UPDATE = defined @BagBrother/core/features/caching.lua:74
RegisterSignal = defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
CURRENCY_DISPLAY_UPDATE = defined @BagBrother/core/features/caching.lua:92
GUILD_ROSTER_UPDATE = defined @BagBrother/core/features/caching.lua:128
UnregisterEvent = defined @Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
Tag = "BAGNON_"
}
_ = "CURRENCY_DISPLAY_UPDATE"
id = nil
quantity = nil
(*temporary) =
{
221 = 415
81 = 10
201 = 54
101 = 5
2589 = 16
1901 = 43624
301 = 100
241 = 42
161 = 2376
42 = 117
tracked =
{
}
126 = 32
}
(*temporary) = nil
(*temporary) = "table index is nil"

commented

@b-morgan
Thank you
It works so far.

commented

@b-morgan
I have edit this:
function Cacher:CURRENCY_DISPLAY_UPDATE(_, id, quantity)
if id and quantity then self.player.currency[id] = quantity > 0 and quantity or nil
end

But now 3 Errors

1x BagBrother/core/features/caching.lua:207: 'end' expected (to close 'function' at line 92) near ''

Locals:

1x BagBrother/core/features/caching.lua:1 BagBrother/core/features/caching.lua:207: 'end' expected (to close 'function' at line 92) near ''

1x Interface\FrameXML\Bindings.xml:1 BagBrother/core/features/caching.lua:1 BagBrother/core/features/caching.lua:207: 'end' expected (to close 'function' at line 92) near ''

commented

@GeoRam2016,

@b-morgan I have edit this: function Cacher:CURRENCY_DISPLAY_UPDATE(_, id, quantity) if id and quantity then self.player.currency[id] = quantity > 0 and quantity or nil end

You are missing an "end". The function should be (lines 92,93,94):

function Cacher:CURRENCY_DISPLAY_UPDATE(_, id, quantity)
	if id and quantity then self.player.currency[id] = quantity > 0 and quantity or nil end
end

or if you don't mind changing the line numbers (92-96):

function Cacher:CURRENCY_DISPLAY_UPDATE(_, id, quantity)
	if id and quantity then 
              self.player.currency[id] = quantity > 0 and quantity or nil 
        end
end