Softrix / SmartBuff-Retail

Smartbuff Retail
1 stars 3 forks source link

Error with latest SmartBuff and retail client #23

Closed MyTechnoHunter closed 1 year ago

MyTechnoHunter commented 1 year ago

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 [string "@SmartBuff/SmartBuff.lua"]:3135: in function [string "@SmartBuff/SmartBuff.lua"]:531: in function [string "@SmartBuff/SmartBuff.lua"]:720: in function

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 commented 1 year ago

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

Softrix commented 1 year ago

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 commented 1 year ago

to be fair that's a perfectly reasonable solution. I'll add it to the main branch.

On Wed, 10 May 2023, 11:05 pm Michael, @.***> wrote:

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;

`

— Reply to this email directly, view it on GitHub https://github.com/Softrix/SmartBuff-Retail/issues/23#issuecomment-1542374449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUBWPYRHCTAUDJJVXIJ3LXFOVCPANCNFSM6AAAAAAWSIQUXM . You are receiving this because you commented.Message ID: @.***>

MyTechnoHunter commented 1 year ago

Ty kindly