Ara Broker Reputations

Ara Broker Reputations

15.1k Downloads

Drop down does not work in 10.2.7

bubfeeld opened this issue ยท 39 comments

commented

When you mouseover the reputation in the broker display(im using Chocolate bar), i get the following error:

ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:329: attempt to perform arithmetic on local 'currentValue' (a nil value)
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:329: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:311>
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:460: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:437>
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:737: in function `OnEnter'
[string "@ChocolateBar/Chocolate.lua"]:263: in function <ChocolateBar/Chocolate.lua:232>

commented

Locals:
standingId = 5
barValue = 3000
bottomValue = 3000
topValue = 9000
factionId = 2593
colors =

{
1 =
{
}
2 =
{
}
3 =
{
}
4 =
{
}
5 =
{
}
6 =
{
}
7 =
{
}
8 =
{
}
9 =
{
}
10 =
{
}
}
session = 0
data =
{
unlockDescription = ""
renownReputationEarned = 0
bountySetID = 0
renownLevel = 40
isUnlocked = false
factionID = 2593
expansionID = 9
celebrationSoundKit = 213204
name = "Keg Leg's Crew"
renownFanfareSoundKitID = 213208
uiPriority = 6
textureKit = "plunderstorm"
renownLevelThreshold = 2500
}
isCapped = true
current = 2500
standingText = "Renown 40"
textureLabel = "plunderstorm"
texture = "Interface\Icons\UI_MajorFaction_plunderstorm"
currentValue = nil
threshold = nil
_ = nil
hasRewardPending = nil
(*temporary) = 0
(*temporary) = 40
(*temporary) = false
(*temporary) = 2593
(*temporary) = false
(*temporary) = 40
(*temporary) =
{
start = 2500
max = 2500
}
(*temporary) = 2500
(*temporary) = 0
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on local 'currentValue' (a nil value)"
IsMajorFaction = defined =[C]:-1
GetMajorFactionData = defined =[C]:-1
HasMaximumRenown = defined =[C]:-1

commented

was able to workaround this by making the Keg Legs Crew rep 'inactive'

commented

I'll take a look at it as time permits, busy with other projects right now so it will be a few days.

commented

Can you provide a screenshot of this reputation "Keg Leg's Crew" in the Blizzard Reputation Tab?

I never played Plunderstorm, so I don't appear to have this rep, so not sure where it should be appearing and I'm not getting the error, I suspect because I never played Plunderstorm.

commented

Aww, it wasnt that bad, i liked it ok,lol

it appears very very last after the Classic Streamwheddle Reps

WoWScrnShot_050824_124449

commented

Didn't say it was good/bad, just didn't have time or desire to play it. Ok, I'll take a crack at fixes, but as I don't have this issue or rep myself, I have no way of testing a fix of any kind. Nor reproducing the issue either.

commented

@bubfeeld - Can you try with just loading your broker display (Chocolate and the AddOn)? I want to make sure we're isolating the error to just the Addon. Turns out you can get this rep to load by talking to the rep vendor in Valdrakken. So my toon now has it and not seeing this error.

commented

yah i tried enabling the rep to show on another toon, and at first the drop down worked, but upon reloading it would not, it gave the same error.

I also did as you asked and loaded up just the addon the Chocolate bar , same error message as before.

Something with Renown level 40 maybe? Dont think the others went that high.

just an fyi as well, when the dropdown worked, i had a category labeled 'other', where im assuming the rep went, but nothing was displayed

commented

@bubfeeld - Maybe it's because your Alliance. (joking).

I'll take another look at it but may not have time to really dig into it for a few days. Suggest using the workaround for now (make it inactive)

commented

lol, i play both factions , but yah, for some reason I really think its due to the level 40 renown

commented

@bubfeeld - I've posted a potential fix here: https://github.com/AraBroker/Ara_Broker_Reputations/blob/master/Ara_Broker_Reputations.lua

Please download and test. I have no way of vetting this as I'm not getting the error and don't have anywhere close to max rep with the Plunderstorm rep. Let me know if it works for you. Not going to fully release until this is tested.

Just tested and it doesn't appear to be working still :(

commented

@bubfeeld - I've posted a potential fix here: https://github.com/AraBroker/Ara_Broker_Reputations/blob/master/Ara_Broker_Reputations.lua

Please download and test. I have no way of vetting this as I'm not getting the error and don't have anywhere close to max rep with the Plunderstorm rep. Let me know if it works for you. Not going to fully release until this is tested.

commented

what does the line "isUnlocked = false" mean?

Could that be a thing since the rep isnt 'unlocked' in game ?

commented

There is no code that would break at 40 renown, it doesn't even look to see what level you're on, it calculates based on max level the rep is reporting. The thought that it's breaking due to 40 renown is not accurate.

Not sure what to provide at this point, I have no way of testing or replicating, so I can't test effectively a fix.

@bubfeeld - Does it provide a line number for the error?

commented

Yah it was just a thought about level 40,here is the error i get after i put in the code:

1x ...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:357: attempt to perform arithmetic on global 'currentValue' (a nil value)
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:357: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:336>
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:467: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:444>
[string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:744: in function `OnEnter'
[string "@ChocolateBar/Chocolate.lua"]:263: in function <ChocolateBar/Chocolate.lua:232>

Locals:
standingId = 5
barValue = 3000
bottomValue = 3000
topValue = 9000
factionId = 2593
colors =

{
1 =
{
}
2 =
{
}
3 =
{
}
4 =
{
}
5 =
{
}
6 =
{
}
7 =
{
}
8 =
{
}
9 =
{
}
10 =
{
}
}
session = 0
data =
{
unlockDescription = ""
renownReputationEarned = 0
bountySetID = 0
renownLevel = 40
isUnlocked = false
factionID = 2593
expansionID = 9
celebrationSoundKit = 213204
name = "Keg Leg's Crew"
renownFanfareSoundKitID = 213208
uiPriority = 6
textureKit = "plunderstorm"
renownLevelThreshold = 2500
}
isCapped = true
current = 2500
standingText = "Renown 40"
textureLabel = "plunderstorm"
texture = "Interface\Icons\UI_MajorFaction_plunderstorm"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 40
(*temporary) = 0
(*temporary) = 40
(*temporary) = false
(*temporary) = 2593
(*temporary) = false
(*temporary) = 40
(*temporary) =
{
start = 2500
max = 2500
}
(*temporary) = 2500
(*temporary) = 0
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on global 'currentValue' (a nil value)"
IsMajorFaction = defined =[C]:-1
GetMajorFactionData = defined =[C]:-1
HasMaximumRenown = defined =[C]:-1
GetBalanceForMajorFaction = defined @Ara_Broker_Reputations/Ara_Broker_Reputations.lua:282
GetParagonValues = defined @Ara_Broker_Reputations/Ara_Broker_Reputations.lua:310

commented

@bubfeeld - Ok, let me see what that might provide

commented

@bubfeeld - Just pushed a new file, download again and test when you can

commented

That line isn't even in the code

commented

lol and the Keg Legs Crew rep displays as "friendly' with 3000 rep to go

commented

well dam that didnt work either, wont display any faction, this error is what i got too

2x ...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:357: bad argument #1 to 'mod' (number expected, got nil)
[string "=[C]"]: in function mod' [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:357: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:336> [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:460: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:437> [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:737: in function OnEnter'
[string "@ChocolateBar/Chocolate.lua"]:263: in function <ChocolateBar/Chocolate.lua:232>

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = "number expected, got nil"

commented

I mean the mod wouldnt display the rep(for me anyway) when first 'discovered', (i had a category called 'other' that was blank when opened), maybe have the mod just ignore the Keg Legs Crew rep altogether?

commented

i may have gotten it to work, i commented out this line(358 after the last code edits)

"--return mod(currentValue, threshold), threshold, colors[10], standingText, hasRewardPending, session, texture"

and it displays the rep

But it now shows a couple of my Dragonflight reps as Paragon and not Renown, they are capped and have rewards

commented

i am using Bugsack and Buggrabber addons

this is what they gave me

2x ...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:357: bad argument #1 to 'mod' (number expected, got nil)
[string "=[C]"]: in function mod' [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:357: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:336> [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:460: in function <...ns/Ara_Broker_Reputations/Ara_Broker_Reputations.lua:437> [string "@Ara_Broker_Reputations/Ara_Broker_Reputations.lua"]:737: in function OnEnter'
[string "@ChocolateBar/Chocolate.lua"]:263: in function <ChocolateBar/Chocolate.lua:232>

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = "number expected, got nil"

commented

I think I may have found what's going on. Your hack is not a fix. Download the latest file and try again. It may still error, but it should paste some debugging code in the chat window.

Specifically, I'm looking for "Plunderstorm is not a Paragon faction"

commented

Ok, I pushed another update with a bit more debugging code, since I can't test this on my own. Redownload the file and let me know what appears in chat.

commented

Make sure you are getting the latest file. That's the error from the previous run, and I reverted those changes and added debugging code. Looks like you're not getting the updated file. Make sure to download this file:
https://github.com/AraBroker/Ara_Broker_Reputations/blob/master/Ara_Broker_Reputations.lua

Make sure you're overwriting the file in the Addons/Ara_Broker_Reputations folder, and then make sure to close your client and reload.

Also, make sure to clear any previous errors in BugSack and BugGrabber

commented

ah ok, was just reloading UI and I didnt have the reverted file, but i got the following chat messages

Faction iD 2574
Faction ID 2507
Faction ID 2574
and Plunderstorm is not a paragon faction

commented

What I thought. Ok, give me some time, I'm breaking for a bit, but I think I know what's going on here and how to fix.

commented

neat, glad I could help in real time! LOVE this addon and your continued work on it! Thank you

commented

my chat exploded
lol no really I got the new message

Faction ID 2507
Faction ID 2574
Plunderstorm is not a paragon faction
Plunderstorm is not a paragon faction and is capped

commented

Yah i knew all of that, its just before the fix it would display as Renown(max number) even when capped, kind of liked it that way :O)

commented

Ok, I just pushed a new file, so you'll need to redownload. This should hopefully correct the issue. You shouldn't get errors, but you should still get the two debugging messages for Plunderstorm.

If this does not error, also validate that the value you see in the Blizzard Rep panel is matching what you see in Ara.

If it's all good, then let me know and I'll remove debugging code and release.

commented

Ok no error, the Keg Legs Crew shows as Renown 40, but my capped Renown reps show as "Paragon 1" rather than Renown 20 or 25(Its Dragonscale and Dream Wardens)

Its the same on my main who has several capped Renowns

commented

It should do that. That's normal. Paragon is where you're at max Renown or Exalted, and it continues to allow you to gain rep for rewards. All Dragonflight Renowns support Paragon, except apparently Plunderstorm. The number after Paragon indicates the number of times your rep has rolled over. 1, means you're at Renown 20 + 1 reward, 2 you're an Renown 20 with 2 rewards, etc.

So looks like it's working now.

commented

Hmm, ok, let me review that.

commented

Ok, one more download, this should hopefully be the last one. I've removed the debugging messages, errors should be gone, and it should revert back to the old behavior for Renown reps in Paragon.

commented

Yup all good!!! Looks like it did before (the Renown display) and NO errors! Thanks once again for working on this, I truly appreciate it!!

commented

Good to hear. I'll probably run with it a bit before I publish just to make sure I didn't break anything else, then I'll roll it up and put in on Curse a bit later. But you have the fixed code.

commented

Final fix will be rolled in r78