Lua error when clicking a pet battler from the world map
Esperi74 opened this issue ยท 1 comments
Is there an existing issue for this?
- I have searched the existing open and closed issues.
Description
When clicking a pet battle quest NPC's icon on the world map, the map closes and a Lua error is displayed.
PetTracker Version
11.1.9
World of Warcraft Flavor
Retail
World of Warcraft Region
EU
Tested with only PetTracker
I got this issue with only PetTracker enabled
Lua Error
Message: ...nterface/AddOns/PetTracker/addons/journal/rivals.lua:165: bad argument #1 to 'ipairs' (table expected, got nil)
Time: Sun May 18 10:27:21 2025
Count: 1
Stack:
[Interface/AddOns/PetTracker/addons/journal/rivals.lua]:165: in function 'update'
[Interface/AddOns/PetTracker/addons/journal/rivals.lua]:149: in function 'Refresh'
[Interface/AddOns/PetTracker/addons/journal/rivals.lua]:110: in function 'SetRival'
[Interface/AddOns/PetTracker/addons/main/classes/abstract/rival.lua]:44: in function 'Display'
[Interface/AddOns/PetTracker/addons/main/classes/maps/rivalPin.lua]:38: in function <...Ons/PetTracker/addons/main/classes/maps/rivalPin.lua:37>
Locals:
self = PetTrackerRivalsJournalList {
ScrollChild = PetTrackerRivalsJournalListScrollChild {
}
scrollDown = PetTrackerRivalsJournalListScrollBarScrollDownButton {
}
scrollChild = PetTrackerRivalsJournalListScrollChild {
}
selected = <table> {
}
scrollUp = PetTrackerRivalsJournalListScrollBarScrollUpButton {
}
scrollBar = PetTrackerRivalsJournalListScrollBar {
}
}
self = PetTrackerRivalsJournalList {
ScrollChild = PetTrackerRivalsJournalListScrollChild {
}
scrollDown = PetTrackerRivalsJournalListScrollBarScrollDownButton {
}
scrollChild = PetTrackerRivalsJournalListScrollChild {
}
selected = <table> {
}
scrollUp = PetTrackerRivalsJournalListScrollBarScrollUpButton {
}
scrollBar = PetTrackerRivalsJournalListScrollBar {
}
}
off = 0
rivals = <table> {
1 = <table> {
}
2 = <table> {
}
3 = <table> {
}
4 = <table> {
}
5 = <table> {
}
6 = <table> {
}
7 = <table> {
}
8 = <table> {
}
9 = <table> {
}
10 = <table> {
}
11 = <table> {
}
12 = <table> {
}
13 = <table> {
}
14 = <table> {
}
15 = <table> {
}
16 = <table> {
}
17 = <table> {
}
18 = <table> {
}
19 = <table> {
}
20 = <table> {
}
21 = <table> {
}
22 = <table> {
}
23 = <table> {
}
24 = <table> {
}
25 = <table> {
}
26 = <table> {
}
27 = <table> {
}
28 = <table> {
}
29 = <table> {
}
30 = <table> {
}
31 = <table> {
}
32 = <table> {
}
33 = <table> {
}
34 = <table> {
}
35 = <table> {
}
36 = <table> {
}
37 = <table> {
}
38 = <table> {
}
39 = <table> {
}
40 = <table> {
}
41 = <table> {
}
42 = <table> {
}
43 = <table> {
}
44 = <table> {
}
45 = <table> {
}
46 = <table> {
}
47 = <table> {
}
48 = <table> {
}
49 = <table> {
}
50 = <table> {
}
51 = <table> {
}
52 = <table> {
}
53 = <table> {
}
54 = <table> {
}
55 = <table> {
}
56 = <table> {
}
57 = <table> {
}
58 = <table> {
}
59 = <table> {
}
60 = <table> {
}
61 = <table> {
}
62 = <table> {
}
63 = <table> {
}
64 = <table> {
}
65 = <table> {
}
66 = <table> {
}
67 = <table> {
}
68 = <table> {
}
69 = <table> {
}
70 = <table> {
}
71 = <table> {
}
72 = <table> {
}
73 = <table> {
}
74 = <table> {
}
75 = <table> {
}
76 = <table> {
}
77 = <table> {
}
78 = <table> {
}
79 = <table> {
}
80 = <table> {
}
81 = <table> {
}
82 = <table> {
}
83 = <table> {
}
84 = <table> {
}
85 = <table> {
}
86 = <table> {
}
87 = <table> {
}
88 = <table> {
}
89 = <table> {
}
90 = <table> {
}
91 = <table> {
}
92 = <table> {
}
93 = <table> {
}
94 = <table> {
}
95 = <table> {
}
96 = <table> {
}
97 = <table> {
}
98 = <table> {
}
99 = <table> {
}
100 = <table> {
}
101 = <table> {
}
102 = <table> {
}
103 = <table> {
}
104 = <table> {
}
105 = <table> {
}
106 = <table> {
}
107 = <table> {
}
108 = <table> {
}
109 = <table> {
}
110 = <table> {
}
111 = <table> {
}
112 = <table> {
}
113 = <table> {
}
114 = <table> {
}
115 = <table> {
}
116 = <table> {
}
117 = <table> {
}
118 = <table> {
}
119 = <table> {
}
120 = <table> {
}
121 = <table> {
}
122 = <table> {
}
123 = <table> {
}
124 = <table> {
}
125 = <table> {
}
126 = <table> {
}
127 = <table> {
}
128 = <table> {
}
129 = <table> {
}
130 = <table> {
}
131 = <table> {
}
132 = <table> {
}
133 = <table> {
Reproduction Steps
Open world map.
Navigate to a zone with an pet battle quest NPC, e.g. Eric Davidson in Duskwood.
Click the NPC's icon on the map.
Last Working Version
No response
Screenshots
Related issue happening in MoP as well. If you click a trainer on the map it throws this error. The only way to avoid it is to manually open the rivals tab and close it again. Then trainers become clickable correctly.
1x PetTracker/addons/journal/rivals.lua:236: attempt to index local 'slot' (a nil value)
[PetTracker/addons/journal/rivals.lua]:236: in function 'Display'
[PetTracker/addons/journal/rivals.lua]:193: in function 'Update'
[PetTracker/addons/journal/rivals.lua]:152: in function 'Refresh'
[PetTracker/addons/journal/rivals.lua]:112: in function 'SetRival'
[PetTracker/addons/main/classes/abstract/rival.lua]:45: in function 'Display'
[PetTracker/addons/main/classes/maps/rivalPin.lua]:41: in function <...Ons/PetTracker/addons/main/classes/maps/rivalPin.lua:40>
Locals:
self = Frame {
NineSlice = Frame {
}
zone = FontString {
}
layoutType = "InsetFrameTemplate"
name = FontString {
}
model = PetTrackerRivalsJournalModel {
}
Bg = PetTrackerRivalsJournalBg {
}
quest = Frame {
}
}
rival = <table> {
1 = <table> {
}
2 = <table> {
}
3 = <table> {
}
map = 71
items = "1WRP1"
name = "Obalis"
model = 45381
currencies = ""
gold = 0
quest = 31971
id = 66824
}
completed = true
rewards = <table> {
1 = <table> {
}
}
(for state) = <table> {
1 = <table> {
}
}
(for control) = 1
i = 1
loot = <table> {
count = 1
icon = 133663
link = "|cffffffff|Hitem:89125::::::::85::104::::::::|h[Sack of Pet Supplies]|h|r"
}
slot = nil
(*temporary) = <table> {
count = 1
icon = 133663
link = "|cffffffff|Hitem:89125::::::::85::104::::::::|h[Sack of Pet Supplies]|h|r"
}
(*temporary) = 31971
(*temporary) = true
(*temporary) = "attempt to index local 'slot' (a nil value)"

