Torhal / Broker_Currency

A LibDataBroker display of currencies and gold totals for session / today / yesterday / this week / last week.
https://www.curseforge.com/wow/addons/broker-currency
5 stars 6 forks source link

Check if local variable left4 is set #13

Closed christophknuth closed 1 year ago

Wraithlord2015 commented 3 years ago

Just wanted to offer my sincerest thanks for fixing this addon! After having implemented your fix - I'm using the latest version of the addon, and haven't had any problems thus far.

TreizeEU commented 3 years ago

Sorry, this only fixes the lua errors for me for the latest version, it does not fix the mouse-over tooltip showing currencies and correct amount of gold.

Any ideas would be welcome. Will test when new fix-attempts is suggested, I will use my modified 9.0.2.1 until then. :)

KyrosKrane commented 3 years ago

I have the same issue as TreizeEU. With this fix, there are no lua errors, and the Display options that show on the broker display are correct. But when I mouse over the broker display, the popup only has a list of character names, with no currencies at all. I verified I have some selected in my settings.

Wraithlord2015 commented 3 years ago

Not sure what's going on. Initially I wasn't experiencing problems with the mouse over issue. After logging in a few minutes ago - it's back doing to doing it again - so reverting.

rhodan412 commented 3 years ago

The project is 4 months old, has it been abandoned?

I made fixes to an older version to allow gold and new 9.1 currencies to be listed and there are no bugs. If @Torhal is interested, I'd be happy to provide this to him so that a fix can be pushed while hopefully the April update is worked out. @Torhal if you're interested in these fixes, just drop a message below this one and I'll provide you with what I've got.

TreizeEU commented 1 year ago

Hello Torhal.

I am getting the below lua errors when I try to use this new commit. The broker only saying Loading.

I'm still using the 9.0.2.1 version that I have uploaded to ticket #16 . All I've done to it was to add new currencies each patch, and I commented out lines 761-765 which broke in the 10.0 pre-patch.

1x Broker_Currency/Tooltip.lua:180: attempt to index local 'gainedReference' (a nil value) [string "@Broker_Currency/Tooltip.lua"]:180: in function <Broker_Currency/Tooltip.lua:177> [string "@Broker_Currency/Tooltip.lua"]:216: in function <Broker_Currency/Tooltip.lua:184> [string "@Broker_Currency/Tooltip.lua"]:274: in functionOnEnter' [string "@ChocolateBar/Chocolate.lua"]:266: in function <ChocolateBar/Chocolate.lua:235>

Locals: currencyIDList =

{ 1 = 829 2 = 1174 3 = 398 4 = 821 5 = 1535 6 = 384 7 = 393 8 = 1172 9 = 1173 10 = 754 11 = 677 12 = 400 13 = 394 14 = 828 15 = 397 16 = 676 17 = 401 18 = 385 19 = 399 20 = 1534 21 = 697 22 = 738 23 = 752 24 = 1273 25 = 1129 26 = 994 27 = 1580 28 = 776 29 = 163036 30 = 116415 31 = 37829 32 = 21100 33 = 515 34 = 49927 35 = 1379 36 = 944 37 = 789 38 = 1602 39 = 1356 40 = 1357 41 = 26045 42 = 26044 43 = 1792 44 = 1149 45 = 1704 46 = 391 } profitTable =
{ } gainedReference = nil spentReference = nil (for index) = 1 (for limit) = 46 (for step) = 1 index = 1 currencyID = 829 (temporary) = nil (temporary) = nil (*temporary) = "attempt to index local 'gainedReference' (a nil value)"`

`5x Broker_Currency/Broker_Currency.lua:247: attempt to call method 'SetCurrencyTokenByID' (a nil value) [string "@Broker_Currency/Broker_Currency.lua"]:247: in function <Broker_Currency/Broker_Currency.lua:245> [string "@Broker_Currency/Broker_Currency.lua"]:630: in function <Broker_Currency/Broker_Currency.lua:627>

[string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <Ace3/AceAddon-3.0/AceAddon-3.0.lua:61> [string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:494: in function InitializeAddon' [string "@Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:619: in function <Ace3/AceAddon-3.0/AceAddon-3.0.lua:611>