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

Broken in 10.1.7 #5

Closed
mxpxh2ogo opened this issue Sep 6, 2023 · 6 comments
Closed

Broken in 10.1.7 #5

mxpxh2ogo opened this issue Sep 6, 2023 · 6 comments

Comments

@mxpxh2ogo
Copy link

Frames are broken and addon is not working. This is error (no other addons on). Love the addon! Thanks!

Message: ...e/AddOns/ImprovedStableFrame/ImprovedStableFrame.lua:102: attempt to index global 'PetStableModel' (a nil value)
Time: Wed Sep 6 07:43:58 2023
Count: 1
Stack: ...e/AddOns/ImprovedStableFrame/ImprovedStableFrame.lua:102: attempt to index global 'PetStableModel' (a nil value)
[string "@Interface/AddOns/ImprovedStableFrame/ImprovedStableFrame.lua"]:102: in main chunk

Locals: clientVersion = 100107
wow_900 = true
wow_800 = true
wow_503 = true
maxSlots = 200
NUM_PER_ROW = 10
heightChange = nil
widthDelta = 315
heightDelta = 204
f = ImprovedStableFrameSlots {
0 =
NineSlice = Frame {
}
layoutType = "InsetFrameTemplate"
Bg = Texture {
}
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = 485
(*temporary) =
(*temporary) = 438
(*temporary) =
(*temporary) = -26.000002
(*temporary) =
(*temporary) = 91.000008
(*temporary) = -26.000002
(*temporary) =

{
BottomLeftCorner =
{
}
RightEdge =
{
}
TopEdge =
{
}
BottomEdge =
{
}
TopRightCorner =
{
}
TopLeftCorner =
{
}
LeftEdge =
{
}
BottomRightCorner =
{
}
}
(*temporary) = nil
(*temporary) = nil
(*temporary) =
{
1 =
{
}
2 =
{
}
3 =
{
}
4 =
{
}
5 =
{
}
6 =
{
}
7 =
{
}
8 =
{
}
9 =
{
}
}
(*temporary) = 9
(*temporary) = nil
(*temporary) = "attempt to index global 'PetStableModel' (a nil value)"

@tflo
Copy link

tflo commented Sep 6, 2023

Change PetStableModel to PetStableModelScene in ImprovedStableFrame.lua, lines 102 and 103:

--- Old	2023-09-06 15:23:47.000000000 
+++ New	2023-09-06 15:23:47.000000000 
@@ -96,14 +96,14 @@
 	PetStableFrame.Inset:SetPoint("TOPLEFT", f, "TOPRIGHT")
 	PetStableFrame:SetWidth(PetStableFrame:GetWidth() + widthDelta)
 	PetStableFrame:SetHeight(PetStableFrame:GetHeight() + heightDelta)
 
 	PetStableFrameModelBg:SetHeight(281 + heightDelta)
 
-	local p, r, rp, x, y = PetStableModel:GetPoint(1)
-	PetStableModel:SetPoint(p, r, rp, x, y - 32)
+	local p, r, rp, x, y = PetStableModelScene:GetPoint(1)
+	PetStableModelScene:SetPoint(p, r, rp, x, y - 32)
 
 	PetStableStabledPet1:ClearAllPoints()
 	PetStableStabledPet1:SetPoint("TOPLEFT", f, 8, -36)
 
 
 	local searchInput = CreateFrame("EditBox", "ISF_SearchInput", f, "SearchBoxTemplate")

@ZForceSeattle
Copy link

I have the same problem, but I thought I'd add a picture of what it looks like if I go to the stable master. I thought it might be a simple update of the stable master data table, but I've tried it several times with no luck. I have an addon that allows me to move my frames around, so I also tried to see if the reason was that it was not fitting onto my screen fully and was running into the null on the bottom part of the frame. But it made no difference. After a reload, I got the same error. The small library file is not in the middle of the main frame of the addon.

I've added a picture, but it is cutting off the bottom part due to a known issue with the Snipping Tool in Windows.

Improved Stable

@tflo
Copy link

tflo commented Sep 6, 2023

Have you tried the fix I posted above?

For me, it works. I have only tested it briefly, but I can move pets around, exchange pets, and the frame representation is fixed. (I had the same error as the OP, and the same graphical glitch as in your screenshot.)

Here is a copy of the addon as I'm using it:

ImprovedStableFrame.zip

This version contains an additional change: It checks at load time if the player class is a Hunter. If not, it doesn't load any code. If you don't like that, just remove the check at the very beginning of ImprovedStableFrame.lua (2 lines).


PS: I'm on Retail.

@ZForceSeattle
Copy link

POSSIBLE SOLUTION

Thank you for your message. When did you get your update? I'm using the November 2022 release listed here and on Curseforge (app and page). I compared the TOC and the lua; they look the same, but....

I deleted the variables, directories, cache files, and everything related to the addon. I reinstalled the addon from the Curseforge APP, and even though it still shows a version date of 10.0 - November - It is now working.

I am still determining where the problem comes from. I rarely need to open the stable frame because I always use the same pets. The reinstall also fixed an error I was getting on another addon - weird.

I did get the "You are using out-of-date addons" message when I logged on today, and I'm wondering if it is becoming a thing with the version dates. My friend who does the primary programming with Titan said it had become a problem for some of his items.

@tflo
Copy link

tflo commented Sep 6, 2023

"You are using out-of-date addons"

This is completely irrelevant, it's just a number in the toc file that is checked by Blizz, not any relevant content.

When did you get your update?

Not sure what you mean. The latest version by the author of the addon (to my knowledge) is 10.0.0. I haven't seen an update since then.

I am still determining where the problem comes from.

As said here, it's a frame name that has changed in 10.1.7, from PetStableModel to PetStableModelScene. (Hence the "nil value" in the error.)

If you apply my fix (or download my patched version from above), then it should work. At least for me it does. No need to delete Saved Variables or cache files.

PS: In my patch, I've also updated the toc number for 10.1.7, so you won't get any "You are using out-of-date addons" warning either, in case this matters. I have left the version number of the addon unchanged (10.0.0).

@ascott18
Copy link
Owner

ascott18 commented Sep 7, 2023

Fixed in a8210c3

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

No branches or pull requests

4 participants