Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with latest SmartBuff and retail client #23

Closed
MyTechnoHunter opened this issue Apr 4, 2023 · 4 comments · Fixed by #25
Closed

Error with latest SmartBuff and retail client #23

MyTechnoHunter opened this issue Apr 4, 2023 · 4 comments · Fixed by #25

Comments

@MyTechnoHunter
Copy link

1x SmartBuff/SmartBuff.lua:359: attempt to index field '?' (a nil value)
[string "@SmartBuff/SmartBuff.lua"]:359: in function <SmartBuff/SmartBuff.lua:358>
[string "@SmartBuff/SmartBuff.lua"]:4560: in function <SMARTBUFF_BuffOrderReset>
[string "@SmartBuff/SmartBuff.lua"]:3135: in function <SMARTBUFF_Options_Init>
[string "@SmartBuff/SmartBuff.lua"]:531: in function <SMARTBUFF_OnEvent>
[string "@SmartBuff/SmartBuff.lua"]:720: in function <SMARTBUFF_OnUpdate>
[string "*SmartBuff.xml:41_OnUpdate"]:1: in function <[string "*SmartBuff.xml:41_OnUpdate"]:1>

Locals:
reset = true
(*temporary) = nil
(*temporary) = 2
(*temporary) = 2
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field '?' (a nil value)"
B =

{
1 =
{
}
}
CS = defined @SmartBuff/SmartBuff.lua:291
cBuffIndex =
{
}
cBuffs =
{
}

@speedwaystar
Copy link
Contributor

does that happen (only) when you do a full reset? the fix atm is to reloadui, which is annoying but works.

@Softrix
Copy link
Owner

Softrix commented May 10, 2023

I can confirm this is an issue because it also existed in the build ive been working on for Wrath of the Lich King using the retail codebase. However, the problem lies with the B table not being initialised correctly and I still need to trace it back to where and why.

However, a quick fix for me until i get my lazt butt onto gear and trace it back was to add the checks in stages (not ideal but it stablised it for now).

In the function called InitBuffOrder(reset) at the top, I changed it to:

`
local function InitBuffOrder(reset)
if not B then B = {} end
if not B[CS()] then B[CS()] = {} end
if not B[CS()].Order then B[CS()].Order = {} end
local b;
local i;
local ord = B[CS()].Order;

`

@speedwaystar
Copy link
Contributor

speedwaystar commented May 10, 2023 via email

@MyTechnoHunter
Copy link
Author

Ty kindly

speedwaystar added a commit to speedwaystar/SmartBuff-Retail that referenced this issue May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants